CDaoRecordset/CRecordset/ODBC Question 
Author Message
 CDaoRecordset/CRecordset/ODBC Question

I would like to establish an ODBC database connection using the
CDaoRecordset class instead of the CRecordset because of the additional
support for seeking.  Can anyone tell me if it is possible to establish
an ODBC connection with the CDaoRecordset class, and if so, what
problems I might run into using the seek methods.

The database I am attaching to is MS Access, which I realize makes a
difference -- the database does support seeks.

Thank You In Advance,
Bob Mixon



Sat, 27 May 2000 03:00:00 GMT  
 CDaoRecordset/CRecordset/ODBC Question

I don't believe you can do this. You can't use CDaoRecordset to establish an
ODBC connection to an Access database, and you will get a specific message
to this effect if you try. You can use the CDao classes to open the Access
database directly if you want to use Seek(), but then you will be limiting
your implementation (for the most part) to Access databases.

In general, I have found the CDao classes less than desirable for accessing
ODBC data sources such as SQL Server. (I'll be glad to provide horror
stories about non-deterministic behavior and impossible to diagnose errors
that occurred when I tried this).

CDbRecordset and ODBCDirect may offer better support for this, but then you
don't get any ClassWizard support .

--
Randy Baker (remove Z from address in email replies)

Quote:

>I would like to establish an ODBC database connection using the
>CDaoRecordset class instead of the CRecordset because of the additional
>support for seeking.  Can anyone tell me if it is possible to establish
>an ODBC connection with the CDaoRecordset class, and if so, what
>problems I might run into using the seek methods.

>The database I am attaching to is MS Access, which I realize makes a
>difference -- the database does support seeks.

>Thank You In Advance,
>Bob Mixon




Tue, 30 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Questions on ODBC & CRecordset

2. ODBC CRecordset m_strFilter CString question

3. ODBC, CRecordSet - question

4. ODBC and CRecordSet Sort Question

5. CDaoRecordSet -- CDaoRecordSet -- CDaoRecordSet

6. Classes derived from CRecordset and CDaoRecordset

7. CRecordSet vs. CDaoRecordset

8. Converting CRecordSet Applications to CDaoRecordSet

9. Linked ODBC and CDaoRecordset

10. Upsizing CDaoRecordset to ODBC data source

11. ODBC + CDaorecordset + FindFirst (or SELECT FROM .. WHERE clause)

12. CDaoRecordset.AddNew() fails with ODBC Sybase SQL Anywhere

 

 
Powered by phpBB® Forum Software