Question

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

Was it helpful?

Solution

I use SQLAPI++. Well worth a look.

http://www.sqlapi.com/

OTHER TIPS

You can use SOCI http://soci.sourceforge.net or also Wt::Dbo, http://www.webtoolkit.eu and look at the Wt::Dbo component.

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.

You can check Debea - SQL Database Access and ORM for C++. It has API for wxWidgets built-in.

Qt is also an option. It supports the connections to the servers you want, and quite simple to use.

http://doc.trolltech.com/4.4/sql-driver.html#supported-databases

When using Qt, you don't need to build against all Qt. You can for example just use the SQL part, and leave the whole GUI part outside.

Since it has been recently LGPL-ed, you can also use it for a proprietary application.

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