tags:

views:

98

answers:

1

Hi All,

I downloading table from SQL 2008 using VFP 8.0 (SP1) using command: COPY TO xxx TYPE XLS Some of the data in the excel is disappearing.

Example, Table in SQL: Cus(ID int(4), CusNam VARCHAR(35))

When i issue the following command at VFP Forms:

(a) COPY TO xxx TYPE FOX2x [Data display correctly as following]

*ID CusNam

1 ABC

2 DEF*

(b) COPY TO xxx TYPE XLS [2nd Record disappear]

*ID CusNam

1

2 DEF*

Appreciate for any helps!

+1  A: 

For testing, I would just copy to VFP directly as a table to see if THAT writes out correctly. Then you can copy it out from there.. Are you using the view designer and connection, or manually controlling via something like

nHandle = SQLConnect( "YourConnectionStringInfo" )
SQLExec( nHandle, "Select * from YourSQLTable", "IntoLocalVFPCursor" )
select IntoLocalVFPCursor
COPY TO PermanentLocalVFPTable
USE PermanentLocalVFPTable
BROWSE
SQLDisconnect( nHandle )

In all the years of VFP / SQL, I don't ever recall any such data loss. However, when doing a dump to Excel, there is a limit of records to 65535... the max of older Excel file format capacity which was never extended since.

DRapp