SQLConnect

The SQLConnect function uses the following parameters.

Parameter Description
szDSN The name of the data source as returned by SQLDataSources.
szUID The user login ID.
szAuthStr The user-specified authentication string (typically the password).

SQLConnect retrieves the value of the LANGUAGE keyword from the ODBC data source definition. If the SQL Server driver is unable to use the specified language, it uses the default language for the specified user ID, and SQLConnect returns SQL_SUCCESS_WITH_INFO. If SQL Server is unable to use the default language for the specified user ID, SQLConnect returns SQL_ERROR.

SQLConnect retrieves the value of the DATABASE keyword from the ODBC data source definition. If the SQL Server driver is unable to use the specified database, it uses the default database for the specified user ID, and SQLConnect returns SQL_SUCCESS_WITH_INFO. If SQL Server is unable to use the default database for the specified user ID, SQLConnect returns SQL_ERROR.