From: Warren Young Date: August 9 2011 11:20pm Subject: Re: Problem with exec() List-Archive: http://lists.mysql.com/plusplus/9428 Message-Id: <1AC41365-F9D1-44D6-B391-D9526F6BDB52@etr-usa.com> MIME-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On Aug 9, 2011, at 10:39 AM, Joseph Hesse wrote: > My problem is that the error code never gets executed. > When the query is correct the query always gets executed. MySQL++ throws exceptions by default when there is an error in the SQL = syntax. Adrian's example works because it passes "false" to the Connection = constructor, which turns off exceptions, giving the "return an error" = behavior you are expecting in this circumstance. This is all spelled out in the manual. Hint.=