In this recipe, you learn how to prepare the SAS/SHARE Data Provider to access a specific version of the SAS/SHARE Server. Sample code for the ADO recipe is included.
Applies to: | SAS/SHARE Data Provider |
Implement using: | ADO or OLE DB |
By default, the SAS/SHARE provider uses the SAS 9.1 server access method. However, you can explicitly request access to a Version 7 or Version 8 SAS/SHARE server.
For example, when you are writing to the ADO interface, you set the "SAS Server Release" property to the server version value. The following code specifies the Version 6 SAS/SHARE server.
obConnection.Provider = "sas.ShareProvider.1" obConnection.Properties("SAS Server Release") = 7 obConnection.Open
When writing to the ADO interface, the value of the "SAS Server Release" property determines which access method the provider uses to communicate with the SAS/SHARE server. The property is set on the Connection object because the connection is bound to a specific server.
Values for the "SAS Server Release" property are integer numbers that correspond to the version number of the server being accessed: 7, 8, or 9. The default value is 9. The value 8 is valid for both Version 7 and Version 8 server. You only need to explicitly set the "SAS Server Release" property if you are accessing a SAS/SHARE server other then SAS 9.1.
When writing to the OLE DB interface, the access method is set with the DBPROP_SAS_SERVERRELEASE property. This property is a member of the DBPROPSET_SAS_DBINIT property set.