开发者

COPY TO xxxx.xls TYPE XLS (VFP 8.0 SP1)

开发者 https://www.devze.com 2022-12-29 02:07 出处:网络
I downloading table fr开发者_如何学Pythonom SQL 2008 using VFP 8.0 (SP1) using command: COPY TO xxx TYPE XLS

I downloading table fr开发者_如何学Pythonom 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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消