Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to rollback table update change via CA.
Message
From
09/02/2004 05:56:11
 
 
To
09/02/2004 00:01:19
James Chan
Objectmastery Pty Ltd
Hawthorn, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00875339
Message ID:
00875374
Views:
14
James,

you must control SQL Server transaction, VFP not control remote transactions and Remote Pessimistic Locks.

I donnot use cursorAdapter, but:
 set multilocks on

locursor = createobject('SQLAdapter')

with loCursor

if .cursorfill(.f., .t.)

 begin transaction

insert into Transact values ('IS00000005', 'JC ')
insert into Transact values ('IS00000006', 'JC ')

browse
* here you must send a "BEGIN TRAN" to SQL Server
IF tableupdate(1)
 ....
* here you must send a "ROLLBACK" to SQL Server
rollback

browse

=TABLEREVERT(.t.)

brow

else

* dimension laErros[1]
aerror(laErrors)
messagebox(laErrors[2])

endif

* WHERE YOU PUT END TRAN :

* here you must send a "COMMIT" to SQL Server
END TRAN

endwith
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform