The SAS
Data Set Options property is supported only by the IOM Provider. This
property can be used to set a variety of data set options that affects
how the SAS Workspace Server accesses a data set. This property is
similar to the SAS Page Size property in that the property affects
the SAS Workspace Server rather than affecting the client. One performance-related
use of this property is to set the number of rows that the SAS Workspace
Server retrieves from a data set. Using the OBS= data set option improves
performance by directing the SAS Workspace Server to subset data when
retrieving data. For more information about SAS data set options,
see “SAS Data Set Options” in
SAS Language
Reference: Dictionary.
The following
code shows how to use the SAS data set options with the OBS= data
set option:
' obConnection is an open Connection object.
Dim obRecordset As New ADODB.Recordset
' Set the active connection here instead of on the Open method.
obRecordset.ActiveConnection = obConnection
If InStr(LCase(obConnection.Provider), "iomprovider") <> 0 Then
' Limit results to 250 rows
obRecordset.Properties("SAS Data Set Options") = "obs=250"
obRecordset.Open "seashell.mediate", , adOpenForwardOnly, adLockReadOnly, adCmdTableDirect
End If