Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table updates using remote views
Message
 
To
14/06/2002 11:59:18
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00668596
Message ID:
00668606
Views:
33
This message has been marked as the solution to the initial question of the thread.
Hi, Raz!

It doesn't work if you try to deal with BEGIN TRANS ... against remote data - you have to use SqlCommit/SqlRollback instead!
* set to manual transaction
LOCAL lnConn
lnConn = CursorGetProp( "ConnectHandle", "rv_table1" )
SqlSetProp( m.lnConn, "Transactions", 2 )
IF TABLEU(.T., .T.,"rv_table1") .AND. TABLEUPDATE(.T., .T.,"rv_table2") 
   * well done - commit
   SqlCommit( m.lnConn )
ELSE
   * something wrong - rollback
   SqlRollBack( m.lnConn )
ENDIF
Note 1: Shared connection is an important precondition because SqlCommit is connection-scoped!
Note 2: There is no SqlBeginTrans() because any transaction start automatically, your job is only to commit or rollback!
SeBaFlu
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform