akif
akif

Reputation: 12334

C++ Database Connectivity?

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

Upvotes: 4

Views: 1069

Answers (6)

Lukasz
Lukasz

Reputation: 355

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

Upvotes: 1

Bob
Bob

Reputation: 191

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.

Upvotes: 2

anon
anon

Reputation:

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.

Upvotes: 2

Glen
Glen

Reputation: 22290

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.

Upvotes: 0

Kevin Dungs
Kevin Dungs

Reputation: 1577

What about sqlite?

http://www.sqlite.org/

Upvotes: 1

Related Questions