


Use this variable to specify the locking method that the Acu4GL product should use when accessing your data source. Possible values are:
none
SETPOS
SETSTMTOPTION
UPDATECOLUMN
Example:
A-ODBC-LOCK-METHOD UPDATECOLUMN
The default value is none, meaning that the Acu4GL product will do nothing special to lock your data. This does not necessarily mean that your data won't be locked. Locking depends mainly on your data source and driver. No value simply tells Acu4GL for ODBC not to perform any locking functions.
Specify SETPOS as your lock method to tell Acu4GL for ODBC to perform the following locking sequence:
When setting up a statement handle for accessing the ODBC data source, the Acu4GL product calls a function called SQLSetScrollOptions, with values (SQL-CONCUR-LOCK, SQL-SCROLL-KEYSET-DRIVER, 1).
When fetching rows from the data source, the Acu4GL product calls SQLExtendedFetch instead of SQLFetch.
Finally, it calls SQLSetPos, with the values (1, SQL-POSITION, SQL-LOCK-EXCLUSIVE).
If any of these functions do not exist in the ODBC driver, then
A-ODBC-LOCK-METHOD reverts to none.
Specify SETSTMTOPTION as your lock method for ODBC version 2.0 (and later) drivers. This option is similar to SETPOS, except ODBC version 2 defines a new function called SQLSetStmtOption which performs the task of SQLSetScrollOptions, but has more functionality.
In particular, when using this method of locking, the Acu4GL product will call SQLSetStmtOption a number of times, with values (SQL-CONCURRENCY, SQL-CONCUR-LOCK), (SQL-CURSOR-TYPES, SQL-CURSOR-KEYSET-DRIVEN), and (SQL_KEYSET-SIZE, 1). Again, if the function does not exist, then A-ODBC-LOCK-METHOD reverts to none.
UPDATECOLUMN
Specifying UPDATECOLUMN as your lock method performs an entirely different type of locking. Instead of trying to lock a row while reading it, this method creates a new statement handle for the data source. Then, after fetching the data from the data source, it resubmits an SQL query to select the same row (based on the primary key) and adds an UPDATE clause. Last, it fetches the data from the data source. Because this method has the most overhead, it is not recommended for slow drivers such as Microsoft Access, but it is much more likely to succeed in locking records.