Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database Access Libraries for C++

Background:

I have an application written in native C++ which uses the wxWidgets toolkit's wxODBC database access library which is being removed from all future versions of wxWidgets . I need to replace this with another database access method that supports the assumptions and contraints outlined below. I don't require that the replacement use native DBMS APIs or ODBC under the hood, but it must meet the contraints outlined below.

Assumptions/Constraints

The library must:

  • Support Native (i.e. unmanaged) C++
  • 32-bit Windows 2000/XP/2003
  • Visual Studio 2005
  • Microsoft SQL Server 2000 and 2005
  • Oracle 9 and 10
  • Run-time Performance greater than or equal to wxODBC
  • Single programmer API supporting multiple DBMS (e.g. don't want to write different code for using different DBMS)

Nice but Optional:

  • 64-bit Windows operating systems
  • 32-bit and/or 64-bit Linux operating systems
  • Microsoft SQL Server 2008
  • Oracle 11
  • MySQL
  • Any additional DBMS
  • Visual Studio 2008
  • Open Source
  • Runtime Performance near or equal to native DBMS API

Question:

What good libraries are available - either free, open source or pay - that support multiple DBMS from a single API including Oracle and Microsoft SQL Server and can be used from native C++?

Please describe any past experiences you have had - good OR bad - with a given library and why you are making your recommendation for or against a given library, especially in regards to the assumptions and contraints above.

See Also:

https://stackoverflow.com/questions/74141/good-orm-for-c-solutions

like image 459
Zach Burlingame Avatar asked Jan 13 '09 18:01

Zach Burlingame


2 Answers

I use SQLAPI++. Well worth a look.

http://www.sqlapi.com/

like image 73
Rob Avatar answered Sep 24 '22 06:09

Rob


A library is http://otl.sourceforge.net/

An employer of mine used it.

I can't tell you how its performance compares with wxODBC, but it might fit your requirements.

like image 22
ChrisW Avatar answered Sep 26 '22 06:09

ChrisW