Remote Data Objects

Connecting With RDO

Much like DAO, RDO has its own object hierarchy and uses collections to manage database connections. To connect using RDO, set the RDO reference, then connect using the Connection object.

Reference the RDO Object Library

As with DAO, before you can use RDO in your application you must first make a reference to the object library. At the time of writing, this library is Microsoft Remote Data Object 2.0 .

Connection Object

An RDO Connection object is similar to DAO's Database object. It represents connections to the database. Although the Connection object requires an Environment object, RDO automatically provides a default Environment object, just as DAO provides a Workspace object.

Example

This example declares a new RDO Connection object and then uses it to open a connection to a SQL Server database:
 Set cn = New rdoConnection With cn .Connect = "DSN=pubs;UID=sa;PWD=" .EstablishConnection End With 


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net