Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CURSORSETPROP() Values for updating remote views?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Virtual environment:
VirtualBox
Divers
Thread ID:
01631771
Message ID:
01631774
Vues:
62
This message has been marked as a message which has helped to the initial question of the thread.
>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.

My guess is that remote view doesn't have the SendUpdates property set properly. You can do that like this:

DBSetProp('MyView', 'View', 'SendUpdates', .T.)
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform