Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Begin Transaction
Message
From
29/04/2002 07:47:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQL Begin Transaction
Miscellaneous
Thread ID:
00650298
Message ID:
00650298
Views:
47
Hello, everyone

Suppose one has an invoice, stored in two tables. The data is stored in an SQL Server, and accessed throught two updateable remote views.

The 'Add invoice' process is issued as follows:
a) TABLEUPDATE(the_first_view)
b) handle = CURSORGETPROP('the_first_view,connecthandle')
c) SQLEXEC(handle,'SELECT @@identity AS nIdent','local_cursor')
d) SELECT the_second_view
e) REPLACE ALL invoice_id with local_cursor.nIdent
f) TABLEUPDATE(the_second_view)
I'd like to have this in a transaction.

Q: how to implement a transaction mechanism here and is there a way to rollback the first view if the second tablupdate() fails?


Hoping I made myself clear,
Grigore Dolghin
Class Software.
Next
Reply
Map
View

Click here to load this message in the networking platform