On Wed, Jun 6, 2012 at 10:41 PM, Simon Walter <si...@gikaku.com> 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);
        cmd.setConnection(&con);
        cmd.setCommandText(
            "Insert into test_tbl(fid, fvarchar20) values(:1, :2)");
        cmd.Param(1).setAsLong() = 2;
        cmd.Param(2).setAsString() = "Some string (2)";
        cmd.Execute();
        cmd << (long)3 << "Some string (3)";
        cmd.Execute();
        con.Commit();

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
properly.

Lars Nilsson

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to