Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table updates using remote views
Message
De
14/06/2002 14:07:44
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:
00668699
Vues:
24
Thanks a million for your response. I tried your code. The data get added
from TABLE1 to TABLE2 & gets deleted from TABLE1. The rollback
works fine on TABLE2 where data gets added, but in TABLE1 the records stay deleted. Should't all records in TABLE1 put back to original state as UNDELETED. The sample code below:

Thanks Again
Raz

*---------------------
select rv_table1
scan
scatter memvar
select rv_table2
append blank
gather memvar

select rv_table1
delete
endscan

* set to manual transaction
local lnconn
*lnconn = cursorgetprop( "connecthandle", "rv_table1" )
*sqlsetprop( m.lnconn, "transactions", 2 )

*-- gnC = SQLCONNECT("uas_connection")

sqlsetprop(gnc, "transactions", 2 )
if tableupdate(.t., .t.,"rv_table1") .and. tableupdate(.t., .t.,"rv_table2")
* well done - commit
*sqlcommit( m.lnconn )
sqlcommit( gnc )
else
* something wrong - rollback
*sqlrollback( m.lnconn )
sqlrollback( gnc )
endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform