Hey, I want to know how to connect databases with C++? Any cross-platform solution which supports many databases? I know about SQLAPI++ but its a shareware... so any free one? What solutions do I have if I limit the OSes to Windows only?
Thanks
Hey, I want to know how to connect databases with C++? Any cross-platform solution which supports many databases? I know about SQLAPI++ but its a shareware... so any free one? What solutions do I have if I limit the OSes to Windows only?
Thanks
Why not the Qt framework? its available under the LGPL now. Its simple to use, cross platform, free, provides an easy api to access several database engines without having to know about the underlying db.
You can use OTL (http://otl.sourceforge.net/) to connect to Oracle, and DB2-CLI Databases. It will also connect using ODBC, so if your DB supports that it should work.
It's based around C++ templeates.
It's free, but I'm not sure what license it's released under.
For cross platform, both for your apps and for the databases they can use, your best bet is to use ODBC in some form. Try Googling for "odbc c++ wrapper" for a number of possible solutions.