|
Question : OLEDB VS ODBC in MFC.
|
|
I start learning database programming in MFC by using Appwizard. In the middle of Appwizard , I have to choose OLEDB or ODBC.
I observed there are completely two different results for the two options.
For selecting OLEDB, a class is generated. The structure of this class is same as the table in the database. In addition, a recordset class is also generated. This recordset class's base class is "CCommand"
For selecting ODBC, a recordset class is generated. This recordset class's base class is "CRecordSet".
They are very different pictures in these two options.
My questions are : 1. Which one should I learn OLEDB or ODBC? 2. Will OLEDB replace ODBC in future by microsoft?
Any comments? Thanks.
|
|
Answer : OLEDB VS ODBC in MFC.
|
|
1. Which one should I learn OLEDB or ODBC?
Definitely OLEDB and ADO. As Microsoft pushes the DNA architecture more and more, ODBC will slowly be phased out.
2. Will OLEDB replace ODBC in future by microsoft?
That has always been the stated direction of Microsoft. This is why there is an OLEDB provider for ODBC drivers. That way, even if your particular DBMS doesn't have an OLEDB provider yet, if it has an ODBC driver, you can still use OLEDB or ADO.
By the way, I would also concentrate on ADO where possible.
HTH, Tom Archer
|
|
|
|