Restriction: This topic applies only when a Database Connectors license has been installed via the Micro Focus License Management System.

This is one of two locking methods available with Database Connectors for MSSQL. The methods are accessed via the A_MSSQL_NATIVE_LOCK_TIMEOUT configuration variable. If A_MSSQL_NATIVE_LOCK_TIMEOUT is set to a positive value, native locking is used. Otherwise, the AcuLocks1 table is used to hold locks.

This locking method enables you to use Microsoft SQL Server native locks if you explicitly code transactions in your COBOL program. You can access this method by setting A_MSSQL_NATIVE_LOCK_TIMEOUT to a positive value. This value is the number of seconds that a connection waits for a timeout to occur. When such a timeout occurs, Database Connectors assumes that the timeout is caused by a locked record, and returns error 99 (record locked). If you set this variable but do not explicitly code transactions in your COBOL program, record locking does not occur. Note that Database Connectors waits the number of seconds specified, and your application may appear to stop responding if the timeout is too long. On the other hand, if the timeout is too short, you may get record locked errors when the network is slow.

Microsoft SQL Server uses a page-locking mechanism, and so this method of locking records may cause your application to return spurious record locked errors caused by a record being locked on the same page as the record you are trying to access. Microsoft SQL Server 7.0 uses row-level locking, but because of the timing issue, using this option is not recommended.

Note: Even with this variable set, the interface still needs the AcuOpenTables1 table. For information about AcuOpenTables1, see Table Locking.