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:
01455066
Vues:
36
>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 see that in eddition to these properties we also set UpdateType = 1 and BufferingMode and CompareMemo to .F.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform