Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use BEGIN TRANSACTION with Sql Passthrough
Message
De
16/09/2004 13:46:50
 
 
À
16/09/2004 01:45:10
Raoshan Kumar
Softinfo Systems Pvt. Ltd.
New Delhi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00942755
Message ID:
00943038
Vues:
15
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform