From: Warren Young Date: June 2 2008 9:00am Subject: Re: mysqlpp::Query Issue List-Archive: http://lists.mysql.com/plusplus/7684 Message-Id: <4843B6BC.4050307@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit onlyreply-sql@stripped wrote: > I think the problem was with > default constructor on query object not properly being initialized. > Once I initialized sqlquery object like this ... mysqlpp::Query > sqlquery = commonDBCon.query(); , the problem went away Are you saying that it doesn't work when you pass the query string to Connection::query()? The examples do this in several places successfully, and this is an intended feature, so if you can show an instance where it doesn't work, I'd be interested in seeing compilable code that shows it. > LeaveCriticalSection(&m_csDBAccess); Not MySQL++ related, but this is highly error-prone code. You should be using an RAII pattern here to make sure that all code paths that exit the function release the critical section mutex. It appears fine now, but future maintenance could add a code path that accidentally doesn't release the mutex. See the code for MySQL++'s Transaction class -- it's short -- for the general idea.