Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use BEGIN TRANSACTION with Sql Passthrough
Message
From
16/09/2004 13:46:50
 
 
To
16/09/2004 01:45:10
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00942755
Message ID:
00943038
Views:
16
>Hi all
>
>Can you suggest me how to issue the "BEGIN TRANSACTION" and "END TRANSACTION" using VFP 7.0 SQL Passthrough functions. How do I ensure that the transactions are safe and secure
>
>Thanks
>
>Raoshan

Hi Raoshan,

It is not recommended to send those commands directly through SPT. If you do, the majority of ODBC drivers stay unaware of the fact that you've opened a transaction and VFP doesn't know about that for sure. All this might work OK, but, in some scenarios, you may find your transaction committed earlier than you expected. Especially when TABLEUPDATE is executed for a multi-table remote view or a CursorAdapter.

The recommended way is to use SQLSETPROP(...,"Transactions",...) to switch to the manual commit mode and SQLCOMMIT()/SQLROLLBACK().

Thanks,
Aleksey.
Previous
Reply
Map
View

Click here to load this message in the networking platform