In this recipe, you learn how to use the IOM Data Provider to access third-party data stores that are available through your licensed SAS/ACCESS engines. Sample code for the ADO recipe is included.
Applies to: | SAS IOM Data Provider |
Implement using: | ADO or OLE DB |
You can use the SAS IOM Data Provider to access third-party data stores that are available through your licensed SAS/ACCESS engines. The following Visual Basic code fragment uses an ADO Command object named cmd to assign a libref and an ADO Recordset object named rs to open a data set.
cmd.ActiveConnection = obConnection cmd.CommandType = adCmdText cmd.CommandText = "libname mylib oracle user=todd password=king path=oraclev7;" cmd.Execute rs.Open "mylib.dept", obConnection, adOpenStatic, adLockReadOnly, adCmdTableDirect
Note: The syntax that you will use in your LIBNAME statement depends on the SAS/ACCESS engine that you are using and on your operating environment. SAS/ACCESS engines are implemented differently in different operating environments. See your DBMS-specific documentation for more information.
Note: For more information about how to open a Connection object, see Opening an ADO Connection Object.
As illustrated for ADO in the Visual Basic code shown previously, there are two steps that you must perform to access the third-party data stores: