Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table updates using remote views
Message
 
À
14/06/2002 11:59:18
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00668596
Message ID:
00668606
Vues:
32
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform