Thursday, April 30, 2009

Explicitly controlling transactions

There are two mutually exclusive ways to control transactions explicitly in a BDE-based database application:
Use the methods and properties of the database component,
such as StartTransaction, Commit, Rollback, InTransaction, and TransIsolation. The main advantage to using the methods and properties of a database component to control transactions is that it provides a clean, portable application that is not dependent on a particular database or server.

Use passthrough SQLin a query component to pass SQL statements directly to remote SQL or ODBC servers. For more information about query components, see "Working with queries.” The main advantage to passthrough SQL is that you can use the advanced transaction management capabilities of a particular database server, such as schema caching. To understand the advantages of your server’s transaction management model, see your database server documentation.
One-tiered applications can‘t use passthrough SQL. You can use the database component to create explicit transactions for local databases. However, there are limitations to using local transactions. For more information on using, local transactions.
When writing two-tiered applications (which require SQL links), you can use either a database component or passthrough SQL to manage transactions.

No comments:

Post a Comment