Help Center

CODBC.Constructorsconstructor

Requests a commit operation for all active operations on all statements associated with an environment.

DatabasesconstructorCODBCDbc.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

CONSTRUCTOR CODBC (BYREF wszConnectionString AS WSTRING, BYVAL nODbcVersion AS SQLINTEGER = SQL_OV_ODBC3, BYVAL ConnectionPoolingAttr AS SQLUINTEGER = 0)
CONSTRUCTOR CODBC (BYREF wszServerName AS WSTRING, BYREF wszUserName AS WSTRING, BYREF wszAuthentication AS WSTRING, BYVAL nODbcVersion AS SQLINTEGER = SQL_OV_ODBC3, BYVAL ConnectionPoolingAttr AS SQLUINTEGER = 0)

Parameters

NameDescription
wszConnectionStringThe connection string.
nOdbcVersionOptional. ODBC version number: SQL_OV_ODBC2, SQL_OV_ODBC3 or SQL_OV_ODBC3_80.
ConnectionPoolingAttrOptional. SQL_CP_ONE_PER_DRIVER or SQL_CP_ONE_PER_HENV.
wszServerNameData source name. The data might be located on the same computer as the program, or on another computer somewhere on a network.
wszUserNameUser identifier.
wszAuthenticationAuthentication string (typically the password).
nOdbcVersionOptional. ODBC version number: SQL_OV_ODBC2, SQL_OV_ODBC3 or SQL_OV_ODBC3_80.
ConnectionPoolingAttrOptional. SQL_CP_ONE_PER_DRIVER or SQL_CP_ONE_PER_HENV.

Description

Allocates a connection handle and, if needed, an environment handle, and opens the database.

Establishes connections to a driver and a data source. The connection handle references storage of all information about the connection to the data source, including status, transaction state, and error information.

Reference

  • Include file CODBCDbc.inc
  • Documented in Databases/ODBC Classes/CODBC Class.md
  • Topic: ODBC Classes