General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only