?
Solved

DAO - Database Access compatibility with Oracle, Sybase, and SQL Server through ODBC

Posted on 2005-03-15
6
Medium Priority
?
244 Views
Last Modified: 2010-04-01
I'm updating an older program, and need to add ODBC Support for Oracle, Sybase and SQL Server. The code is using DAO for database access, and I would like to keep that infrastructure.

What is the preferred way of connecting/querying/updating records in C++ using DAO?

Thanks
0
Comment
Question by:debtoine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 13545104
I'd suggest to start out with http://msdn.microsoft.com/library/en-us/vctutor98/html/_gs_data_access_objects_.28.dao.29_.tutorial.asp ("Data Access Objects (DAO) Tutorial"). From my experience (yet that is a few years ago :o), if you have wored with ODBC and it's MFC encapsulation before, you'll soon be familiar with DAO.
0
 
LVL 7

Expert Comment

by:jimwasson
ID: 13545469
Just a thought -- I'd be a little bit careful about using MFC's DAO classes. We use it extensively in our VC 6.0 vintage project work (DAO is still the fastest database access method Microsoft supports). However, in porting to VS .Net 2003 (VC7), MFC's DAO classes keep popping up deprecated warnings that worry me about the future of DAO in the MFC framework. I know that Microsoft has been pushing people to move from DAO to ADO or OLEDB for years now but haven't succeeded in killing off the DAO API. Because of this we are evaluating whether to move our MFC DAO classes over to OLEDB in VC7.
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 500 total points
ID: 13563736
Did you already manage the connections to Oracle and Sybase?

DAO's primary goal was to get a better performance than with ODBC for ACCESS and SQLServer DBMS using the jet engine. AFAIK, you could connect to ORACLE only by using the Microsoft ODBC driver for ORACLE and *not* the ODBC driver that came with ORACLE DBMS (my favorite). For SYBASE I don't know, however as SQLServer formerly was a SYBASE DBMS it could work with no problems.

Because of these restrictions I used the CDatabase/CRecordset ODBC interface of MFC in some projects and made my own class library based on native ODBC. However, DAO has some nice query functions that couldn't easily substituted by another interface.

Regards, Alex
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question