Previous PageNext Page

9.3.16 Version Property

The ADO version number.
 

Return Values

Returns a String value.
 

Remarks

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

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;" & _

"uid=sa;pwd=;database=pubs"

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

cnn1.Close

End Sub


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page