An IDLdbDatabase object represents a connection to a datasource. Use the IDLdbDatabase object’s instance data and methods to connect to, disconnect from, and perform operations to a Database Management System (DBMS).

Superclasses


None

Creation


Use the following IDL DataMiner command to create a new database object:

DBObj = OBJ_NEW('IDLdbDatabase')

Note that the returned database object is not considered valid until a connection to the datasource is made, either via the IDLdbDatabase::Connect method or the DIALOG_DBCONNECT function.

Properties


Objects of this class have the following properties. See IDLdbDatabase Properties for details on individual properties.

IDLdbDatabase Properties


IDLdbDatabase objects have the following properties in addition to properties inherited from any superclasses. Properties with the word “Yes” in the “Get” column of the property table can be retrieved via IDLdbDatabase::GetProperty. Properties with the word “Yes” in the “Set” column in the property table can be set via IDLdbDatabase::SetProperty.

CAN_GET_TABLES

If True, the GetTables method is available for the current driver.

Property Type

Boolean

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

DBMS_NAME

The name of the Database with which the object is associated.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

DRIVER_ODBC_LEVEL

The ODBC level supported by the driver being used to connect to the database.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

DBMS_VERSION

The version number of the Database that the object is associated with.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

DRIVER_VERSION

The version number of the ODBC driver being used to connect to the database.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

IS_CONNECTED

If True, a connection to a database exists.

Property Type

Boolean

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

IS_READONLY

If True, the database is read-only.

Property Type

Boolean

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

MAX_CONNECTIONS

The maximum number of connections supported by the ODBC driver. If the maximum value is unknown, this property will contain 0.

Property Type

Integer

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

MAX_RECORDSETS

The maximum number of recordsets supported by the ODBC driver. If the maximum is unknown, this property will contain 0.

Property Type

Integer

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

ODBC_LEVEL

The ODBC level of the driver manager.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

SQL_LEVEL

The SQL level supported by the connection.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

SQL_SERVER_NAME

The SQL server name for this database connection.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

USE_CURSOR_LIB

If True, the ODBC cursor library will be used. The ODBC cursor library is used to emulate advanced functionality on data sources that don’t support the advanced functions. If you find that advanced functionality is not available using your database’s standard driver, try using the ODBC cursor library. Advanced functionality supported by the cursor library includes positioned updates, positioned deletes, and multi-directional cursor movement.

Note: This property must be set (or unset) before the connection to the data source is made. Once the connection is made, this property cannot be changed. The default is to not use the cursor library.

Note: To support the above-mentioned operations, the cursor library constructs SQL search statements to locate the desired record. If the WHERE clause of the generated SQL statement selects more than one row, the operation will affect more than one record.

Note: On some systems the ODBC cursor library is loaded dynamically. The ODBC system cannot detect whether the library was loaded successfully, so this property may contain a True value if the USE_CURSOR_LIB property was set, even if the cursor library was not subsequently loaded.

Property Type

BOOLEAN

Name String

not displayed

Get: Yes

Set: Yes

Init: No

Registered: No

USER_NAME

The user name used during the connection to the datasource.

Property Type

String

Name String

not displayed

Get: Yes

Set: No

Init: No

Registered: No

VERBOSE

If True, verbose error messages will be generated. Normal error messages contain a text explanation (normally from the ODBC system) of the error. Verbose message include the following additional information:

  • The name of the ODBC function that failed,
  • The error code from the ODBC system,
  • The error code from the database.

Property Type

BOOLEAN

Name String

not displayed

Get: No

Set: Yes

Init: No

Registered: No

Methods


This class has the following methods:

Version History


5.0

Introduced