views:

537

answers:

6

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:

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

+2  A: 

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.

ChrisW
+3  A: 

I use SQLAPI++. Well worth a look.

http://www.sqlapi.com/

Rob
We haven't used SQLAPI++ yet but reviewing it's specifications it seems to fit the bill. Also, it allows you to try it for free first, which will allow us to see if it does meet our needs before we buy. For these two reasons, I'm accepting this answer.
Burly
+1  A: 

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

Lukasz
Interesting, ORM for C++. This goes a step beyond what I need, but it looks like it might provide it's own ODBC implementation as well. I probably can't use the wxWidgets wrapper because I'm guessing that they also use the wxODBC implementation, which is what is being deprecated and thus why I'm asking this question. I'll have to look into this further. Thanks for the info!
Burly
No, debea is not using wxODBC, it provides it's own driver based directly on ODBC API for MS Windows and libiodbc for unix. It will not deprecate with upcoming wxWidgets 3.0.
Lukasz
+1  A: 

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.

Tristram Gräbener
+2  A: 
Boris Kolpackov
I came across this today, it looks good.
Raindog
A: 

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

Raindog