From: Warren Young Date: March 28 2007 4:01am Subject: Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute()) List-Archive: http://lists.mysql.com/plusplus/6482 Message-Id: <4609E87F.6030400@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Michael Hanselmann wrote: > > Query as it should be executed: > SELECT jobid, owner, command, minute, hour, day_of_month, month, > day_of_week, mailto FROM job WHERE owner = 'michael' ORDER BY jobid > > And here's the executed query with current SVN of mysql++: > SELECT jobid, owner, command, minute, hour, day_of_month, month, > day_of_week, mailto FROM job WHERE owner = 'SELECT jobid, owner, > command,\n minute, hour, day_of_month, month, day_of_week,\n mailto\n > FROM job\n WHERE owner = \'michael\'\n ORDER BY jobid' ORDER BY jobid I just changed examples/tquery.cpp to make it match the code you posted as closely as possible, and I can't duplicate it. Your report looks just like what v2.1.1 will do, so I suspect you're mixing old and new libraries here. If you build MySQL++ in place and then just run the example programs directly without first installing the MySQL++ library over the old one, they will link to the old MySQL++ version you have installed elsewhere on your system, not to the one you just built. The exrun scripts work around this problem. On Linux, the command is: ./exrun tquery HOST USER PASS ...and not: ./tquery HOST USER PASS The same thing can happen on Windows, and the solution is the same except that you use exrun.bat: exrun.bat tquery HOST USER PASS ...or: exrun.bat Release\tquery HOST USER PASS The latter syntax lets you override the batch file's default of using the Debug version.