ODBC classes or ADO connection
-
Hi. I'm writing an application, (using MFC), that connects to a SQL 2000 database. In the past I have used indistinctly ADO OLEDB, (using #import statetment and all these COM stuff) and the MFC ODBC classes CDatabase, CRecordset, etc. My question is: Which is the more efficient method?. I will lose something if I start to use ODBC classes more often?. Which are the differents, (technical diff I mean) between these two methods? It would be great to clarify all this because I'm working with those techniques for a long time ago and I really don't know their basements. :) Thank you.
Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )
-
Hi. I'm writing an application, (using MFC), that connects to a SQL 2000 database. In the past I have used indistinctly ADO OLEDB, (using #import statetment and all these COM stuff) and the MFC ODBC classes CDatabase, CRecordset, etc. My question is: Which is the more efficient method?. I will lose something if I start to use ODBC classes more often?. Which are the differents, (technical diff I mean) between these two methods? It would be great to clarify all this because I'm working with those techniques for a long time ago and I really don't know their basements. :) Thank you.
Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )
As far as I know, and I am not a database expert, ADO is build in such a way that the underlying database type is irrelavent to the programmer. Which means that when you are accessing a SQL database with ADO, it is probably going to make calls through ODBC to access the data, which is adding a middle man. In other words using ODCB will be faster than using ADO.
AliR. Visual C++ MVP