In the parts of VFP help where it deals with SPT, there's a part where it says that a cursor brought from a remote server can be made updatable. There are four properties of the cursor which need to be set: Tables, KeyFieldList, UpdateNameList, UpdatableFieldList and SendUpdates. Yes, I've listed five here, but UpdateNameList is for cases when server side names differ from VFP names.
Basically, here's what I do:
- I use a SQL insert command to create a record and another one to return its PK (using MSDE).
- I create a one-record cursor as "select * from msdetable where pk=?nPK" and I get a local VFP cursor
- I CursorSetProp() the four things mentioned above. I tried UpdateNameList as well, but CursorGetProp("UpdateNameList") keeps returning an empty string
- I edit the record
- tableupdate() returns .f.; aerror() returns a "No update tables are specified. Use the Tables property of the cursor." CursorGetProp("Tables") returns "msdetable".
- I repeat all of this several ways, search UT, search MSDN, re-read the help, and conclude nobody published anything of the kind.
- I'd like to keep the hair I still have, so instead of pulling it out, I write this message.
I know I could have written a method to build a SQL Update statement, or used remote views, but I want to do this this way now that I have the time. I think I'm overlooking something obvious, so, did anyone see what it might be?