THE CHALLENGE: I have to insert records from a VFP table to an Access MDB.
THE SOLUTION: Use a DSN to Access and SQLEXEC !!
Not quite, I am having the following issue.
DSN name is "INFORM"
cnHandle = SQLCONNECT("INFORM")
lDate = {01/01/04}
crun = SQLEXEC(cnHandle,"INSERT INTO MyTable (DateOfBirth) VALUES('" ;
+ lDate + "')")
? crun provides a 1 which means the SQLEXEC actually worked and it succesfuly inserted a record into Access MDB.
BUT IF I DO THE FOLLOWING:
cnHandle = SQLCONNECT("INFORM")
lDate = { / / }
crun = SQLEXEC(cnHandle,"INSERT INTO MyTable (DateOfBirth) VALUES('" ;
+ lDate + "')")
? crun provides a -1 which means the SQLEXEC didn't work !
I do have blank date fields in the records I need to exprt to the Access table.
I have larady tried tons of ocmbinations usinf DTOC() and CTOD() and other ideas but to no avail...
Abyvody has ANY ideas ?
thanks !