Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table updates using remote views
Message
From
14/06/2002 14:07:44
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:
00668699
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform