Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CURSORSETPROP() Values for updating remote views?
Message
From
19/02/2016 19:49:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
CURSORSETPROP() Values for updating remote views?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Virtual environment:
VirtualBox
Miscellaneous
Thread ID:
01631771
Message ID:
01631771
Views:
58
I'm using ODBC-based remote views to insert data into SQL Server tables. The general process is:

1. CREATE SQL VIEW MyView ...
2. USE MyView
3. APPEND FROM SomePath\SomeVFPTable.DBF
4. =TABLEUPDATE( .T., .T., "MyView" )

The column names, types and sizes are the same in the VFP table and the destination SQL Server table (names yes, types as close as they can be).

All of the above runs without generating any errors. However, there are no rows in SQL Server after the code runs (should be 92 rows for the test table I'm using).

I have SET MULTILOCKS ON but I've made no other changes to default remote view settings. I suspect I need to set some remote view properties for MyView via CURSORSETPROP() before APPENDing the data and running TABLEUPDATE(). Can someone remind me which properties I need to set?

UPDATE: it looks like, at a bare minimum, SendUpdates needs to be set .T. Any other recommendations for best performance/efficiency? I'm thinking setting the view to Optimistic Table Buffering given the type of updating I'm doing.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Next
Reply
Map
View

Click here to load this message in the networking platform