TestDriverConformance - cConnection
Used to test of the driver can be used as a managed driver
Type: Function
Return Data Type: Boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
| sDriver | String | Driver Name |
| iDriver | Integer | Driver Index |
| hoCLI | Handle |
Syntax
Function TestDriverConformance String sDriver Integer iDriver Handle hoCLI Returns Boolean
Call Example
Get TestDriverConformance sDriver iDriver hoCLI to BooleanVariable
Description
This is called right after a driver loaded but before it is registered. It is used to test of the driver can be used as a managed driver.
By default, it returns True if the driver conforms to managed connections.
A developer can augment this to perform additional conformance tests, such as checking for a minimum client revision. If a driver is not valid, you should raise an error (probably using ConfigurationError) and return false.
Note the parameters are the same as for OnDriverRegistered.
Function TestDriverConformance String sDriver Integer iDriver Handle hoCLI Returns Boolean
Boolean bOk
Integer iClient
Forward Get TestDriverConformance sDriver iDriver hoCLI to bOk
If bOk Begin
If (sDriver="MSSQLDRV") Begin
Get_Attribute DF_DRIVER_SQLSERVER_CLIENT_VERSION of iDriver to iClient
If (iClient<13) Begin
Send ConfigurationError DFERR_SETUP (SFormat("Invalid SQL client driver version %1. A minimum of 13 is required",iClient))
Function_Return False
End
End
End
Function_Return bOk
End_Function
Return Value
True if the driver can be used as a managed driver, else False