Syntax
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
SQLDriverConnect will 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.
|