SQLRETURN SQLDriverConnect( SQLHDBC ConnectionHandle, SQLHWND WindowHandle, SQLCHAR * InConnectionString, SQLSMALLINT StringLength1, SQLCHAR * OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT * StringLength2Ptr, SQLUSMALLINT DriverCompletion);
SQLDriverConnect supports data sources that require more connection information than the three arguments in SQLConnect, dialog boxes to prompt the user for all connection information, and data sources that are not defined in the system information.
After a connection is established, SQLDriverConnect returns the completed connection string. The application can use this string for subsequent connection requests.
See the connection string keywords and Connection dialog.
SQLDriverConnect returns SQL_ERROR and an error message if no authentication mechanism can be selected.