Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement