SQLConnect
Function
Establishes a connection between the driver and the database.
Prototype
c
SQLRETURN SQLConnect(SQLHDBC ConnectionHandle,
SQLCHAR *ServerName,
SQLSMALLINT NameLength1,
SQLCHAR *UserName,
SQLSMALLINT NameLength2,
SQLCHAR *Authentication,
SQLSMALLINT NameLength3);Parameters
Table 1 SQLConnect parameters
Return Values
SQL_SUCCESS: The call is successful.
SQL_SUCCESS_WITH_INFO: Some warning information is present.
SQL_ERROR:The connection failed to be established.
SQL_INVALID_HANDLE: The input handle is invalid.
Example
See: Example