The SAS
SQL procedure enables you to subset data sets by using a WHERE clause.
A data set that is opened by a SAS WHERE clause has the same features
as other SAS data sets, so you can open it for both random and update
access.
To control
WHERE clause processing, you use the "SAS Where" provider property.
The value of the "SAS Where" property is a string that is a complete
and valid SAS WHERE expression. The following Visual Basic code shows
how this task is done.
' obConnection is an open Connection object.
Dim obRecordset As New ADODB.Recordset
obRecordSet.ActiveConnection = obConnection
obRecordSet.Properties("SAS Where") = "flight > 306"
' The second parameter on the Open method must remain empty.
obRecordSet.Open "airline.Flights", , adOpenStatic, adLockReadOnly, adCmdTableDirect