I looked at the produced sql last night after getting an error that the
escaped string was too long for the column.
After looking at the mysql docs on binary escaping I was going to try this
std::string str( data, sizeof(data) );
std::ostringstream os( str );
os << std::hex << std::uppercase << str;
std::string hexData( os.str() );
mysqlpp::Query query = conn.query();
<< "UPDATE customer SET "
<< " Data=0x" << mysqlpp::quote << hexData //mysqlpp::escape
mysqlpp::sql_blob( data, sizeof(data) )
<< ", AccountName=" << mysqlpp::quote <<
<< ", Active=" << mysqlpp::sql_bool(
widget.ActiveCheckBox->checkState() == Qt::Checked ? 1 : 0 )
<< " WHERE CustomerId=" << mysqlpp::sql_int( CustomerId )
std::string sql = query.str();
I found last night that the ios::hex manipulator is not compatible with
mysql++ query streams.
On Thu, Jul 14, 2011 at 4:23 AM, Warren Young <mysqlpp@stripped> wrote:
> On Jul 14, 2011, at 12:20 AM, Kemet wrote:
> > Once you have this in place, everything works great !
> I'm not certain this is the same thing. The OP isn't using SSQLS and
> sql_blob already is "NOT NULL".
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
"There's a zombie outbreak! Oh, no, wait a second... It's just a bunch of