DAO : Accessing External Databases 
Author Message
 DAO : Accessing External Databases

Hi,

I am accessing Oracle database using DAO. I want to connect to a table
directly instead attaching the table in mdb database. I am creating a
database object, and calling its Open function as,

                m_pDB = new CDaoDatabase ();
                m_pDB->Open( "", FALSE, FALSE, "ODBC;" );

Its displaying ODBC datsources dialog and i am able to connect to the
Oracle database.

How can i give the table name, which i want to access, if i create a
recordset object directly from CDaoRecordset? Is it possible to do that?
If it possible, how to access thae data? (Is it by using GetFieldValue
function?)

Thanks in advance.



Mon, 05 Jul 1999 03:00:00 GMT  
 DAO : Accessing External Databases

Quote:

> Hi,

> I am accessing Oracle database using DAO. I want to connect to a table
> directly instead attaching the table in mdb database. I am creating a
> database object, and calling its Open function as,

>                 m_pDB = new CDaoDatabase ();
>                 m_pDB->Open( "", FALSE, FALSE, "ODBC;" );

> Its displaying ODBC datsources dialog and i am able to connect to the
> Oracle database.

> How can i give the table name, which i want to access, if i create a
> recordset object directly from CDaoRecordset? Is it possible to do that?
> If it possible, how to access thae data? (Is it by using GetFieldValue
> function?)

> Thanks in advance.

With DAO you can only access .mdb. Any other types must be attached to
.mdb.


Tue, 06 Jul 1999 03:00:00 GMT  
 DAO : Accessing External Databases

Quote:
> With DAO you can only access .mdb. Any other types must be attached to
> .mdb.

I don't believe that's true.

I have successfully built mdb databases in VB and C++ that have linked
tables via ODBC to SQL Server. The procedure should be the same for Oracle
with ODBC.

But, I think that the CDaoRecordset class can only be used with native mdb
tables or linked tables. Instead of using CDaoDatabase perhaps you should
be using CDatabase. Likewise, CRecordset instead of CDaoRecordset. That's
assuming that you have no reason for using mdb databases. You would be
better off using CDatabase and CRecordset with your ODBC access to the
Oracle tables.



Mon, 12 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem accessing Access 2000 database using DAO. - URGENT

2. Linking external databases with DAO problems..

3. Multiple apps accessing the same database (DAO + MFC)

4. Using DAO classes to connect to secure MS-Access database

5. Restructuring a Microsoft Access database using VC++ 5 and DAO

6. Security for a DAO database access?

7. Retrieving updated information only from MS Access Database w/ MFC DAO

8. Open a secure access database with DAO in VC++

9. Using #import to access database via DAO

10. Compressing MS Access database from within DAO app

11. Openning Access 2000 database with DAO

12. Problem with DAO direct calls and Access 2000 databases

 

 
Powered by phpBB® Forum Software