I am trying to write to a table using SQL Passthru from a record object created from the scatter command. I basically scattering to an object modifying the properties and wish to insert the changes back.
I can't build the text because in some cases the values include quotes and such, but even in the most simple cases it is not working.
oRec.Field1 = 'Test1'
oRec.Field2 = 123
if I do:
sqlexec(iCH,'insert into table (field1,field2) values (oRec.Field1,oRec.Field2)
the record is inserted, but the field are blank
if I do:
sqlexec(iCH,insert into table (field1,field2) values (?oRec.field1, oRec.Field2)
I get a returned (-1) where the aerrors method tells me:
Connectivity error: [Microsoft][ODBC Visual FoxPro Driver]Data type mismatch.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only