So I'm trying to create tables directly in Foxpro 2.5 from VB6 using the codes below:
Expand|Select|Wrap|Line Numbers
- Global fx As New FoxApplication
- Set fx = Nothing
- fx.OleRequestPendingTimeout = 900000
- fx.OleServerBusyTimeout = 900000
- fx.DefaultFilePath = LPath
- fx.DoCmd "CLOSE DATABASES"
- fx.DoCmd "USE customer.dbf"
- fx.DoCmd "COPY STRUCTURE TO TEST"
- fx.DoCmd ("USE")
Expand|Select|Wrap|Line Numbers
- fx.DoCmd ("CREATE TABLE TEST.dbf (FNAME C(12))")
I have also tried using the SQL statement:
Expand|Select|Wrap|Line Numbers
- rs.open "CREATE TABLE TEST (col1 char(6), col2 int(2))", conn, adOpenStatic, adLockOptimistic, adCmdText
I've also searched from the net about this error and had found some codes that checks and repairs the no. of records in the header. Still, to no avail. If you want to see the codes I found, I'll post it here. It's kinda long.
Please, if anyone has some ideas about this, kindly share it to me.. Please shed some light..
Or if there are other solutions on how to create dbase III tables from vb6 (where I can manipulate the width and decimal places of the numeric fields), please post it here.. Thank you all in advance!