>Hi
>
>I have the following lines of code, used to create my local cursor based on a remote SQL Server table:
>
>lnConnectionID = SQLConnect('NursingPersonnel', 'NursingPersonnel', 'deltona_037')
>lnReturnCode = SQLExec(lnConnectionID, 'exec TestTable_Select_Field1 ?1', 'ltResults1')
>
>sele ltResults1
>
>=cursorsetprop('Tables', 'dbo.TestTable')
>=cursorsetprop('UpdateNameList', 'Field1, Field2, Field3')
>=cursorsetprop('KeyFieldList', 'Field1')
>=cursorsetprop('UpdatableFieldList', 'Field2, Field3')
>=cursorsetprop('SendUpdates', .T., 'ltResults1')
>
>I browse ltResults1, make a manual change to data in Field2, and then return to the command window. If I then go to browse ltResults1 I get the following error message:
>
>"No update tables are specified. Use the Tables property of the cursor"
>
>If I perform a manual =tablerevert, the above error disappears and I can browse ltResults 1 again.
>
>Is there an error the above cursorsetprop, or do I have to perform a tableupdate to reflect the changes. Needless to say, my remote SQL Server table TestTable does not reflect any changes.
>
>Regards
>
>edit - the basic code for the above came from
http://support.microsoft.com/kb/138094, so one assumes that it's correct
I'm comparing your code with what we have. First thing I noticed that we check CursorSetProp return value and return false from the program if any of the CursorSetProp fails for some reason.
If it's not broken, fix it until it is.
My Blog