13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

682 LIBNAME Statement Specifics <strong>for</strong> OLE DB 4 Chapter 24of file. This <strong>SAS</strong>/<strong>ACCESS</strong> interface accesses data from these sources through OLE DBdata providers such as Microsoft Access, Microsoft SQL Server, and Oracle.LIBNAME Statement Specifics <strong>for</strong> OLE DBOverviewThis section describes the LIBNAME statement that <strong>SAS</strong>/<strong>ACCESS</strong> Interface to OLEDB supports and includes examples. For details about this feature, see “Overview ofthe LIBNAME Statement <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong>” on page 87.Here is the LIBNAME statement syntax <strong>for</strong> accessing OLE DB.LIBNAME libref oledb ;Argumentslibrefspecifies any <strong>SAS</strong> name that serves as an alias to associate <strong>SAS</strong> with a database,schema, server, or group of tables and views.oledbspecifies the <strong>SAS</strong>/<strong>ACCESS</strong> engine name <strong>for</strong> the OLE DB interface.connection-optionsprovide connection in<strong>for</strong>mation and control how <strong>SAS</strong> manages the timing andconcurrence of the connection to the data source. You can connect to a data sourceeither by using OLE DB Services or by connecting directly to the provider. Fordetails, see “Connecting with OLE DB Services” on page 687 and “ConnectingDirectly to a Data Provider” on page 687.These connection options are available with both connection methods. Here ishow they are defined.USER=user-namelets you connect to an OLE DB data source with a user ID that is differentfrom the default ID. The default is your user ID.PASSWORD=passwordspecifies the OLE DB password that is associated with your user ID. If you donot wish to enter your OLE DB password in uncoded text, see PROCPWENCODE in Base <strong>SAS</strong> Procedures Guide <strong>for</strong> a method to encode it.DATASOURCE=data-sourceidentifies the data source object (such as a relational database server or alocal file) to which you want to connect.PROVIDER=provider-namespecifies which OLE DB provider to use to connect to the data source. Thisoption is required during batch processing. There is no restriction on thelength of the provider-name. If the provider-name contains blank spaces orspecial characters, enclose it in quotation marks. If you do not specify aprovider, an OLE DB Services dialog box prompts you <strong>for</strong> connectionin<strong>for</strong>mation. In batch mode, if you do not specify a provider the connection

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!