Your decision becomes much simpler once you realize that ADO/DAO and
ODBC/OLEDB are two different levels. Think of ADO/DAO as high level
interfaces, ODBC/OLEDB as drivers. You do not want to access
databases at the driver level!
I would start with a VB prototype, in which you can quickly see for
yourself if ADO or DAO is the better interface for your needs (and in
which you can easily learn either without getting bogged down by the
details of using COM objects in C++). ADO is the newer one, has been
written with ease of use for common programming tasks in mind (it
offers some good shortcuts to common operations), and is the interface
being recommended and improved by microsoft. ADO supports connecting
to a database through either ODBC or OLEDB.
As far as which driver should you use to connect to the database, ODBC
or OLEDB, it is a question of: which driver is available, which has
the most acceptable performance for your application, which gives you
access to what you want! It will not be hard to structure your
application so that the connect strings are stored rather than
hardcoded, in which case you really don't care which driver is used
and you can change your mind at any time. Note that there is a
general OLEDB driver (I should say provider like the documentation
says) that can use an ODBC data source, and vice versa, when the
structure of the underlying database allows it (OLEDB is meant to
support a wider class of databases than ODBC, including hierachical
Hope this helps you narrow down your questions when you search msdn,
msdn online, and your other resources.
> I have to solve the following problem:
> 1. Read and select data from various data sources. Normaly via a
> select from a complete table, might be manipulated by a simple where
> statement. The data are customer data in most cases (incl. address,
> no. etc.)
> 2. I have to determine the datasource and the primary keys, so that
> possible to reconnect to the individual database and to select the
> individual record that was used under step 1.
> 3. So later the program should select an specific record, offer some
> to make modifications and update the specific record.
> The use should never be aware that the data is selected from various
> datasources. An administrator should be able to perform step 1.
> The datasources might differ from simple Access tables, over various
> SQL-Engines (Oracle,MS,Pervasive). So think of every system were
> customer data might be stored.
> So from the various access methods, what should I use
> The program will be developed in MSVC++ 6.0.
> I am close at to the point to choose ODBC, because of its wide
> its good tested interface.
> Also ADO/DAO has more feautures and a better command structure.
> And there is the brand new OLEDB, with a very open interface with
> Martin Richter
> Grutzeck-Software GmbH
> Hanau, Germany
> Web: http://www.grutzeck.de