You can directly save the result of SQL statement to DBF.
Important: You should link DBFCDX to the application.
Sample:
Code: Select all
cSql := "SELECT FIRST,CITY,AGE,SALARY FROM customer"
oCn:SaveToDBF( cSql, "c:\fwh\samples\custpart.dbf" )
USE c:\fwh\samples\custpart NEW SHARED VIA "DBFCDX"
XBROWSER "custpart"
Note: This creates a new DBF file.