ONE Active Server Pages Product Home Page Developer Site Version


ADO Connection Object Version Property

The ADO version number.

Version Property Return Values

Returns a String value.

Version Property Remarks

Use the Version property to return the version number of the ADO implementation. The version of the provider will be available on Windows servers as a dynamic property in the ADO Properties Collection. The Properties collection is not currently supported on UNIX.

Version Property Example

This Visual Basic example uses the Version property of a Connection object to display the current ADO version. It also uses several dynamic properties to show the current DBMS name and version, OLE DB version, provider name and version, driver name and version, and driver ODBC version.

Public Sub VersionX()
Dim cnn1 As ADODB.Connection
' Open connection.
Set cnn1 = New ADODB.Connection 
strCnn = "driver={SQL Server};server=srv;" & _
cnn1.Open strCnn
strVersionInfo = "ADO Version: " & cnn1.Version & vbCr & _ 
"DBMS Name: " & cnn1.Properties("DBMS Name") & vbCr & _ 
"DBMS Version: " & cnn1.Properties("DBMS Version") & vbCr & _ 
"OLE DB Version: " & cnn1.Properties("OLE DB Version") & vbCr & _ 
"Provider Name: " & cnn1.Properties("Provider Name") & vbCr & _ 
"Provider Version: " & cnn1.Properties("Provider Version") & vbCr & _ 
"Driver Name: " & cnn1.Properties("Driver Name") & vbCr & _ 
"Driver Version: " & cnn1.Properties("Driver Version") & vbCr & _ 
"Driver ODBC Version: " & cnn1.Properties("Driver ODBC Version")
MsgBox strVersionInfo 
End Sub