Best way to communicate with database (mysql/pgsql etc) in C++ under Linux/FreeBSD ?
I wanted to access Database from C++ in Linux.
I am currently using :
libpqxx of PostgreSQL under c++ (gcc).
but i wanted to use:
unixODBC/iODBC with any database..
but then i have to use some c++ database library like :
DATABASE template library (DTL)
DTL is too complicated to use and documented poorly !!
and libODBC++ doesn't compile properly
and it's interface also looks complicated and poorly documented..
libpqxx of PostgreSQL works great ! ...
but i am kinda limited to one database platform...
Please advice me , if you know any better solution.
Thanks for your time .
This may not be of any interest to you since it is a commercial product, but I've been using it for a couple of years and have found it to be very useful for working with different databases on different hardware.
It supports Oracle, MS SQL, Sybase, DB2, Informix, Interbase/Firebird, Centura SQLBase, MySQL and Postgresql on Windows, Linux and Solaris. For me, it was worth the money but you would have to determine if it fits your needs.
OTL is in the same ballpark as DTL so I don't know if using it would gain you anything. I've never used it, so I can't make a recommendation.
but i am only looking for Open Source solution ..
DTL/OTL works fine .. but it's very complicated to use and very poorly documented ..
i am wondering ,, how big open source programms interact with database..
how PHP , CGIs (those written in c++) achieve this ?
Thanks ! dcaillouet
I am looking in to GNOME-DB now..
(but no success yet !)
maybe this is the solution i am looking for ...