Connects to the ODBC database. Sufficient connection parameters should be defined in the connectString parameter.
Call odbc_DatabaseClose() when you are not using the connection to the database anymore.
odbc_databaseOpen ( connectString As String, _ Optional loginTimeout As Number = 15, _ Optional initialQueryTimeout As Number = 15, _ Optional ignoreErrors? As Boolean = False, _ Optional reuse? As Boolean = True, _ Optional useCursorLibrary? As Boolean = True, _ Optional readOnly As Boolean = False ) As User
Argument | Type | Description |
---|---|---|
connectString | string | Connection string as per ODBC requirements |
loginTimeout | number | Optional; login timeout in seconds; default is 15. |
initialQueryTimeout | number | Optional; query timeout in seconds; default is 15. |
ignoreErrors? | boolean | Optional; if the argument is True , then database errors are not reported as Intent exceptions; default is False . |
reuse? | boolean | Optional; obsolete; default is True |
useCursorLibrary? | boolean | Optional; specifies whether the ODBC Cursor Library DLL should be loaded. The cursor library masks some functionality of the underlying ODBC driver, effectively preventing the use of dynasets (if the driver supports them). The only cursors supported if the cursor library is loaded are static snapshots. Default is False . |
readOnly | boolean | Optional; specifies whether the database connection should be opened in the read-only mode, thus preventing from modification of data; default is False . |
Opens the connection to the ODBC database
Dim db As User = odbc_databaseOpen( "ODBC;DSN=PEFRESULTS" ) '? Do your job '? and close database connection: odbc_databaseClose( db)