Click or drag to resize

SQLConnection.DriverConnect Method (Typed)

X#
Display a dialog box prompting for a source; after a source is selected, displays the driver's connection dialog box; then connects to the selected data source.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOSQLClasses (in XSharp.VOSQLClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD DriverConnect(
	hWindow,
	nDriverCompletion,
	cConnStrIn
) AS LOGIC CLIPPER
Request Example View Source

Parameters

hWindow (Optional)
Type: Usual
nDriverCompletion (Optional)
Type: Usual
cConnStrIn (Optional)
Type: Usual
A string representing an input connection. If omitted, the SQL_DRIVER_PROMPT option should be used to prompt for the driver.

Return Value

Type: Logic
TRUE if successful; otherwise, FALSE. Level 1
Remarks
ConstantDescription
SQL_DRIVER_PROMPTThe driver presents a dialog box listing all sources that have been installed. The user can choose which one to connect to. This is the default.
SQL_DRIVER_ COMPLETE If the connection string (cConnStrIn) contains enough information, the driver will connect to that source; otherwise, a dialog box will be presented to prompt for information.
SQL_DRIVER_ COMPLETE_REQUIRED Behaves like SQL_DRIVER_COMPLETE, except that the driver disables the controls for any information that is not required to connect. SQL_DRIVER_ NOPROMPT If the connection string (cConnStrIn) contains enough information, the driver will connect to that source; otherwise, it returns an error. If cConnStrIn is omitted, the SQL_DRIVER_PROMPT option should be used, which prompts for the driver. If some of the cConnectStrIn information is present, SQL_DRIVER_COMPLETE should be used. If all of the information is passed, then there is no need to prompt for the driver; therefore, the SQL_DRIVER_NOPROMPT option can be used. If the connection fails, a message box will display the error. To suppress the message box, call the SQLConnectErrorMsg(FALSE) function.
See Also