If you want to control transactions manually, you can set the Transactions property to 2, or DB_TRANSMANUAL. With manual transaction handling, Visual FoxPro automatically begins a transaction for you when you issue the first data-writing SQL statement, but you must submit the Visual FoxPro SQLCOMMIT(В ) or SQLROLLBACK(В ) functions to end the transaction. For the CursorAdapter object, you can set the UseTransactions property to false (.F.) and the CursorAdapter does not use transactions to send Insert, Update, or Delete commands.
To use manual transaction mode
Use the DBSETPROP( ) Function to set the Transactions property on the connection to 2 or DB_TRANSMANUAL.
Use the SQLSETPROP( ) Function to set the Transactions property on the active connection to 2 or DB_TRANSMANUAL.
After committing or rolling back the prior transaction, Visual FoxPro automatically begins a new transaction when you issue the next data-writing SQL statement. For more information about transactions, see Programming for Shared Access.
Visual FoxPro supports transactions nested up to five levels for local data. A single level of transaction support is built into SQL pass-through.
If your server supports multiple levels of transactions, you can use SQL pass-through to manage transaction levels explicitly. Explicit transaction management is complex, however, because it can be difficult to control the interaction between the built-in transaction and the timing of remote server transactions. For more information on explicit transaction management, see your ODBC documentation.
Other ResourcesHow to: Use Automatic Transaction Mode
Working with Remote Data Using SQL Pass-Through
Using SQL Pass-Through Technology
Enhancing Applications Using SQL Pass-Through Technology
Planning Client/Server Applications
Upsizing Visual FoxPro Databases