Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote cursor update in SQL Server 2005
Message
 
 
À
17/03/2010 07:51:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01455035
Message ID:
01455063
Vues:
43
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform