From: Warren Young Date: July 13 2011 9:18pm Subject: Re: update fails... any suggestions? List-Archive: http://lists.mysql.com/plusplus/9399 Message-Id: <4E1E0B96.5070501@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 7/13/2011 2:58 PM, Jay Sprenkle wrote: > > The revised query still seg faults when exceptions are turned on. It's probably due to an uncaught exception. If you replace the execute() call with preview() instead and send what it returns to cout or similar, you will probably find that the resulting query isn't syntactically correct, so the exception is probably BadQuery. > I tried quoting just the password, and again quoting all the parameters > (using the 'q'). Looking at the code, it looks like that *should* quote and escape a BLOB. Do the preview() check to find out. Or, again, use SSQLS, which handles this for you. See examples/load_jpeg.cpp. Notice that there is no futzing around with quoting and escaping. > Is the escaping mechanism intended for text perhaps? SQL *is* text. You can't insert random binary data into a SQL query string without escaping it.