DF_DATABASE_MAX_ACTIVE_STATEMENTS
The maximum number of concurrently active statements allowed per connection. A value of 0 (zero) means there is no limit.
Level
Database
Supported by
ODBC only, revision 5 and higher
Type
Integer, temporary
Access
Read/Write
Values
0..
Syntax
Use cli.pkg
Get_Attribute DF_DATABASE_MAX_ACTIVE_STATEMENTS of {driverNumber} {databaseHandle} to {IntegerVariable}
Set_Attribute DF_DATABASE_MAX_ACTIVE_STATEMENTS of {driverNumber} {databaseHandle} to {IntegerVariable}
Driver Configuration Keyword
Remarks
The maximum number of concurrently active statements allowed per connection. A value of 0 (zero) means there is no limit.
This attribute can be queried through ODBC, but some drivers may not return a reliable value. The value of the attribute is used by the driver to determine the size of the statement pool. The driver keeps track of the statements that are used per connection in a 'Most Recently Used' sorted list. If the maximum number of statements is in use, the least recently used statement will be freed whenever an additional statement is required.
Some ODBC drivers return a value of 1 for this attribute, which causes the driver to free and re-allocate statements constantly. For some drivers, the value is accurate (e.g., MS Jet Engine DataFlex ODBC Driver), but for others, it is not (e.g., Oracle ODBC driver).
Example
Procedure ShowDBAttribute Integer iDriver Handle hDatabase
Integer iAttribValue
Get_Attribute DF_DATABASE_MAX_ACTIVE_STATEMENTS of iDriver hDatabase to iAttribValue
Showln "Max active statements per connection: " (If(iAttribValue = 0, " unlimited", String(iAttribValue)))
End_Procedure
The sample code above shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.