f2s_mssql_lock_timeout¶

Applies to: MS SQL

Syntax

set_attribute f2s_mssql_lock_timeout of {DriverID} (f2s_ConstPointer({server}) to {variable}
get_attribute f2s_mssql_lock_timeout of {DriverID} (f2s_ConstPointer({server}) to {variable}

Parameter

Description

DriverID

The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID.

server

Pointer to a string. Pointer to the name of the database server (optional) If this is not defined, the current active server will be used.

variable

Integer, number of milliseconds to wait until timeout DEFAULT = -1, statements will wait indefintely before timing out

Description

Locks are used with transactions to maintain atomicity. If a lock is not released before the timeout, the statement will fail and an error will be raised.

Setting this attribute determines the number of milliseconds that an SQL statement waits for a database lock to be released before timing out. To wait indefinitely, set this to -1 (the default). Getting this attribute returns the number of milliseconds that the SQL statement will wait for a database lock to be releasted before timing out.

Examples

get_attribute

int iTimeout

Get_Attribute f2s_mssql_lock_timeout of _f2s_ActiveDriverId (f2s_ConstPointer("MyDBServer\MyInstance")) to iTimeout

set_attribute

//set the timeout to 10000 ms or  10 s
Set_Attribute f2s_mssql_lock_timeout of _f2s_ActiveDriverId (f2s_ConstPointer("MyDBServer\MyInstance")) to 10000

Replaces: Commands GET_SQL_LOCK_TIMEOUT and SET_SQL_LOCK_TIMEOUT