tags:

views:

276

answers:

2

I'm willing to write a subset of Perl's DBI interface for libodbc (or unixODBC) in C++. I believe doing so will allow me concentrate better on my goal.

BTW, I prefer avoiding to reinvent the wheel, if of course something similar is already out there.

A: 

I don't know a DB API that looks like DBI. Go for it - but add it to the libodbc project as a wrapper API rather than start a brand new project.

good luck.

gbjbaanb
That is exactly what I'm intending to do :)Thanks.
ZeroCool
+5  A: 

NVM, no odbc interface, but it is DBI like (seeing as DBI doesn't use odbc except in DBD::ODBC)

libdbi - http://libdbi.sourceforge.net/

libdbi implements a database-independent abstraction layer in C, similar to the DBI/DBD layer in Perl. Writing one generic set of code, programmers can leverage the power of multiple databases and multiple simultaneous database connections by using this framework.

In order to utilize the libdbi framework, you need to install drivers for a particular type of database. The drivers officially supported by libdbi are split off into the libdbi-drivers project. The current version of libdbi (0.8.3) is supposed to work with any 0.8.x release of libdbi-drivers. Currently the following database engines are supported:

* Firebird/Interbase
* FreeTDS (provides access to MS SQL Server and Sybase)
* MySQL
* PostgreSQL
* SQLite/SQLite3
MkV
That's exactly what I've been looking for.The core API syntax reminds me of Sybase Open Client library!BTW, the dbixx C++ wrapper looks very high level and clear, I can see the reason why CppCMS choosed it ;) Thanks.
ZeroCool