Question

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

Was it helpful?

OTHER TIPS

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.

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.

What about sqlite?

http://www.sqlite.org/

You can check Debea - SQL Access and ORM for C++

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top