|        | 
|  | 
| function | SQLDriverConnect |  | 
| Library: ODBC Include: omodbc.xin
 | Returns: Numeric An SQL return code. The following values may be returned: 
 SQL_SUCCESS (the driver was connected).
SQL_SUCCESS_WITH_INFO (the driver was connected, but a message was issued).
SQL_ERROR (an error occurred).
SQL_INVALID_HANDLE (the handle is invalid).
SQL_NO_DATA (no data was found).
 | 
Declaration   define external counter function SQLDriverConnect
     (  read-only SQL_handle_type ConnectionHandle,
        read-only SQL_handle_type WindowHandle,
        value stream InConnectionString,
        value counter StringLength1,
        modifiable stream OutConnectionString,
        value counter BufferLength,
        modifiable counter StringLength2,
        value counter DriverCompletion )
Purpose
An alternative to SQLConnect, it supports the following:
- data sources that require more connection information than the three arguments in SQLConnect.
- dialog boxes to prompt the user for all connection information.
- data sources that aren't defined in the system information. 
Input arguments:
- ConnectionHandle.
- WindowHandle. The application can pass the handle of the parent window, if applicable, or a null pointer if either the window handle is not applicable or SQLDriverConnectwill not present any dialog boxes.
- InConnectionString. A full connection string, a partial connection string, or an empty string.
- StringLength1. The length of InConnectionString.
- BufferLength. The maximum length of OutConnectionString.
- DriverCompletion. A flag that indicates whether the Driver Manager of the driver must prompt for more connection information. The following values are allowed: 
- SQL_DRIVER_NOPROMPT
- SQL_DRIVER_COMPLETE 
- SQL_DRIVER_PROMPT
- SQL_DRIVER_COMPLETE_REQUIRED
 
Output arguments:
- OutConnectionString. Upon successful connection to the target data source, this buffer contains the completed connection string.
- StringLength2. The returned length of OutConnectionString.
Generated: April 21, 1999 at 2:01:17 pm
If you have any comments about this section of the documentation, send email to [email protected]
 Copyright © OmniMark Technologies Corporation, 1988-1999.