What is a good OO C++ wrapper for sqlite

Viewed 34832

I'd like to find a good object oriented C++ (as opposed to C) wrapper for sqlite. What do people recommend? If you have several suggestions please put them in separate replies for voting purposes. Also, please indicate whether you have any experience of the wrapper you are suggesting and how you found it to use.

14 Answers

Another good wraper for databases in C++ is SOCI. It's not very OO, but the more Modern C++.

It supports Oracle, PostgreSQL and MySQL. A SQLite backend is in the CVS.

http://www.codeproject.com/KB/database/CppSQLite.aspx is just fantastic, it is very easy to port, I had it working on bcb5 (omg) in half an hour or so. It is about as thin as you can get and easy to understand. There are a goodly number of examples that cover just about every thing you need to know. It uses exceptions for error handling - I modified it to provide return codes in a mater of minutes. Only tricky issue is to create your own lib file none are provided.

try
{

    CppSQLite3DB db;

    db.open(asFileName.c_str());

    db.execDML("Update data set hrx = 0");

} // try

catch (...)
{

} // catch

Could not be much simpler than this.....

Related