Hey there folks--
I'm trying to connect to an Advantage database back-end thru ODBC, pull what I need into an updatable cursor, makes changes and close the connection.. it sounds simple enough and from what I've read so far, I'm pretty sure I'm doing everything that needs to be done.. here's the code I have:
Whenever this gets to the [USE IN ldata10] line, it gives me a "No update tables are specified" error, but using CURSORGETPROP() on ldata10 shows Data10. The only way I can get away from the error is by ending Foxpro from task manager.
Could someone explain what I'm doing wrong?
Thanks
-- frank~
I'm trying to connect to an Advantage database back-end thru ODBC, pull what I need into an updatable cursor, makes changes and close the connection.. it sounds simple enough and from what I've read so far, I'm pretty sure I'm doing everything that needs to be done.. here's the code I have:
Code:
locxn = SQLCONNECT('PatientFile')
lnretval = SQLPREPARE(locxn,"SELECT * FROM Data10",'lData10')
?'prepare: ' + STR(lnretval)
lnretval = SQLEXEC(locxn)
?'exec: ' + STR(lnretval)
?CURSORSETPROP("Tables","Data10",'lData10')
?CURSORSETPROP("UpdatableFieldList","Appt_len",'lData10')
?CURSORSETPROP("UpdateNameList","Appt_len appt_len",'lData10')
?CURSORSETPROP("SendUpdates",.t.,'lData10')
LOCATE FOR ldata10.code = '99205'
IF FOUND('ldata10')
replace ldata10.appt_len WITH 99
ENDIF
SELECT ldata10
BROWSE
USE IN ldata10
lnretval = SQLDISCONNECT(locxn)
?'disconnect: ' + STR(lnretval)
Whenever this gets to the [USE IN ldata10] line, it gives me a "No update tables are specified" error, but using CURSORGETPROP() on ldata10 shows Data10. The only way I can get away from the error is by ending Foxpro from task manager.
Could someone explain what I'm doing wrong?
Thanks
-- frank~