Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote cursor update in SQL Server 2005
Message
From
17/03/2010 07:51:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Remote cursor update in SQL Server 2005
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01455035
Message ID:
01455035
Views:
105
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
Next
Reply
Map
View

Click here to load this message in the networking platform