Click to See Complete Forum and Search --> : C++ database for all


xagrez
December 4th, 2002, 10:31 PM
I am meddling with C++ database programming using ADO and OLE DB currently. It seems to be relatively simple to even use MFC and API to speed up the process.

However, my doubts are how to write database software that are not C++ compiler specific. In another words, I want to use standard commands that are recognise by Visual and also Borland C++.

How do i do that?do i use ODBC or what?

TheCPUWizard
December 4th, 2002, 10:40 PM
Alas there is no really good answer for this. Most of the libraries I have seen that will work with different compilers (especially on different platforms) are restricted as to the type of database they can access.

As an example CodeBase is a library that will compile and run using (nearly) and platform or compiler. The flip side is that it will only handle X-Base file formats.

Everything in life is a trade-off. One suggestion is to use an interface class troughout your project. Then you can instanciate different database classes depending on platform, target data format, etc.

Hope this helps....

PaulWendt
December 5th, 2002, 06:14 AM
Check out my post in this thread as it seems to be relevent to
your query [no pun intended]:
http://www.codeguru.com/forum/showthread.php?s=&threadid=221320

--Paul