Have a Question?
Print

00302: Can the ODBC driver lock a record?

Title:

Can the ODBC driver lock a record?

Description:

ODBC supports the concept of transactions. By default, ODBC drivers are in auto-commit mode. Auto-commit mode means that they do everything thay are asked to do when they are asked to do it. The BASIS ODBC Driver, and most others, always work in auto-commit mode.

For those ODBC Drivers that support transactions, the ODBC call SQLTransact must be made when you want to commit your changes. Databases that support transactions guarantee that transactions will be Serializable. Serializability is the concept that, to the outside world, a single user appears to (him or her) as being the only person on the system. This is all done via the magic of locking, dead-lock detection, roll-backs and a few other good tricks. So, in relational databases, you don’t have to worry too much about locking a record. The database knows that you *read* the thing and won’t let anyone change it until your transaction is done. 

The revision 1.1 BASIS ODBC Driver and the PRO/5 SQL engine do not expose the SQLTransact ODBC function in its command set. Therefore, even if you were using a database that supported transactions, you would not explicitly be able to commit a transaction (or get out of autocommit mode) from PRO/5. This is certainly something that we are looking at addressing in the future. 

The BASIS ODBC Driver does try to lock each record that will be modified via an SQL update. However, if the record cannot be locked for an update, then the update fails.



Last Modified: 08/18/1998 Product: BASIS ODBC Driver Operating System: Windows

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top