On Wed, Jun 6, 2012 at 10:41 PM, Simon Walter <simon@stripped> wrote:
> However, memory leaks are not acceptable. So I am open to suggestions. What
> do other c++ programmers use?
I've been happy using SQLAPI++ (http://www.sqlapi.com/) where I work.
Commercial and not open source, but it's cross-platform and supports a
dozen or so different databases.
One of the example programs (without comments and the wrapping try/catch block)
con.Connect("test", "tester", "tester", SA_Oracle_Client);
"Insert into test_tbl(fid, fvarchar20) values(:1, :2)");
cmd.Param(1).setAsLong() = 2;
cmd.Param(2).setAsString() = "Some string (2)";
cmd << (long)3 << "Some string (3)";
Simply replace SA_Oracle_Client with SA_MySQL_Client, etc, and you'll
be working against MySQL. Only requirement is that the dll/so
libraries for each database you want to connect to are installed