Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT updatable cursor - what am I missing?
Message
 
 
À
03/10/2001 13:56:59
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00563752
Message ID:
00563753
Vues:
22
This message has been marked as the solution to the initial question of the thread.
There's mskb#Q138094 How to Create Updatable Views by Using SQL Passthrough.

>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?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform