Getting Version Information
After an ADO connection is open, you can retrieve version information for the data provider, the server, and for the ADO programming interface itself. You also can get the data provider version by opening the Properties dialog box associated with the provider's .DLL file.
Using ADO to Get Version Information
- To retrieve the provider implementation version, you use the "Provider Version" property from the ADO Connection object's Properties collection. The version appears in the form MM.mm.bbbb where MM is the major release number, mm is the minor release number, and bbbb is the build number.
Note: For another way to view provider version information, see Using a Provider's .DLL File to Get Version Information.
- To retrieve the server version, you use the "DBMS Version" property in the Connection object's Properties collection. The version appears in the form MM.mm.rrrrfMMDDYY where MM is the major release number, mm is the minor release number, rrrr is the maintenance release number, f is P for Performance Image, and MMDDYY is the port date.
Note: The local provider does not have an associated server. If you request the server property from the Local Data Provider, it will return the provider implementation version. This is true for both ADO and OLE DB.
- To retrieve the ADO version, you use the Connection object property named Version.
The following Visual Basic code will retrieve version information for the provider, server, and ADO:
Dim strProviderVersion As String
Dim strServerVersion As String
Dim strADOVersion As String
If obConnection.State = adStateOpen Then
strProviderVersion = obConnection.Properties("Provider Version")
strServerVersion = obConnection.Properties("DBMS Version")
strADOVersion = obConnection.Version
End If
Note: To retrieve version information after an OLE DB data source is initialized, use the property DBPROP_PROVIDERVER for the provider and the property DBPROP_DBMSVER for the server.
Using a Provider's .DLL File to Get Version Information
To determine which version of the provider you installed, complete these steps:
- In Windows Explorer, navigate to \Program Files\SAS\Shared Files\SAS Data Providers (or to wherever your SAS\Shared Files folder exists).
- Right click on the .DLL file associated with the provider you want to check. The provider .DLL files for SAS 9.1 are:
- sasaorio0901.dll for the IOM Data Provider and the SAS OLAP Data Provider
- sasafbas0901.dll for the Local Data Provider
- sasafshr0901.dll for the SAS/SHARE Data Provider
- Select Properties from the pop-up menu.
- Select the Version tab on the Properties dialog box to see the version number.