Databases Reference
In-Depth Information
' Get first driver
nRetCode = SQLDrivers(lHEnv, SQL_FETCH_FIRST, sDriverDesc, _
Len(sDriverDesc), nDriverDescLength, sDriverAttr, _
Len(sDriverAttr), nAttrLength)
sAll = ""
Do While nRetCode = SQL_SUCCESS
' Replace NULL separators between atributes with colons
sDriverAttributes = Left$(sDriverAttr, nAttrLength - 1)
Do
x = InStr(sDriverAttributes, Chr$(0))
If x = 0 Then Exit Do
sDriverAttributes = Left$(sDriverAttributes, x - 1) _
& " : " & Mid$(sDriverAttributes, x + 1)
Loop
' Save it
sAll = sAll & Left$(sDriverDesc, nDriverDescLength) _
& " / " & sDriverAttributes & vbCrLf
' Next data source
nRetCode = SQLDrivers(lHEnv, SQL_FETCH_NEXT, sDriverDesc, _
Len(sDriverDesc), nDriverDescLength, sDriverAttr, _
Len(sDriverAttr), nAttrLength)
Loop
txtDrivers = sAll
nRetCode = SQLFreeHandle(SQL_HANDLE_ENV, lHEnv)
End Sub
Some of the driver attributes are worth discussing briefly:
DriverODBCVersion
Gives the version of ODBC that the driver supports. Note that even though the
drivers on my system are Version 3.5 or later, their ODBC Versions are only 2.5.
Thus, they support only ODBC 2.5.
SQLLevel
Describes, in general terms, the level of compliance of the driver to SQL. Level 0
is basic SQL-92 compliance. Level 1 is FIPS127-2 Transitional (whatever that is);
Level 2 is SQL-92 Intermediate; Level 3 is SQL-92 Full.
ConnectionFunctions
Search WWH ::




Custom Search