Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Begin Transaction
Message
 
To
29/04/2002 07:47:50
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00650298
Message ID:
00650621
Views:
15
>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?

Take a look at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk00/html/ft00i6.asp
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform