From: Warren Young Date: January 12 2008 1:01am Subject: Re: query.str() not returning anything List-Archive: http://lists.mysql.com/plusplus/7387 Message-Id: <4788114F.8050402@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Kemin Zhou wrote: > Actually I am using the version 2.0.7 Oh, in that case, then this is expected, though undesired. In older versions of MySQL++, str() has a mode where it will auto-reset Query's string buffer after returning the string, and execute() uses this in versions prior to v2.2.0 unless it's a template query. So, when you come along and call str() a second time, the buffer's already been emptied. Since you're going to have to upgrade to fix this, I recommend waiting for v3, which may come out as early as next week sometime. If upgrading isn't an option, then you'll just have to call str() ahead of execute() to save the buffer in a temporary location that your exception handler can find. But I highly recommend upgrading. MySQL++ has come a long, long way in the past two years.