List:MySQL++« Previous MessageNext Message »
From:jafa Date:April 17 2009 12:32am
Subject:Re: Problem escaping binary data
View as plain text  
> I have a table that needs to store a small amount of binary data 
> (varbinary field).
> The code needs to update a number of rows so I am building a "insert 
> into... on duplicate key update" string with multiple rows to be 
> inserted/updated. The binary data is escaped using 
> conn::escape_string() and delimited with single quotes.
> This works well for most patterns including binary data containing 
> zero characters.
> The problem - if the binary data contains the data "%1" it triggers a 
> "Not enough parameters to fill the template" exception.
> Is there a trick to avoid mysql++ from treating %1 as a parameter 
> replacement trigger?
Never mind... the trick is NOT to call query::parse() before executing 
the query.
(I was calling one of our own helper functions that was "helpfully" 
calling parse())


Problem escaping binary dataNick Kelsey17 Apr
  • Re: Problem escaping binary datajafa17 Apr
  • Re: Problem escaping binary dataWarren Young17 Apr
Re: Problem escaping binary dataWarren Young18 Apr
  • Re: Problem escaping binary dataTorsten Schulz19 Apr