I found identical problems in my application, in a similar environment. I
solved it in this way (ok, it's a big trick, but if you don't have
time...):
// I have to blob into MySql my file_name file with mysql++, so...
// boiled code for connection etc.
// ...
Query query = connection_.query();
query << "INSERT INTO " << MY_TABLE << " (" << MY_FIELD << ") VALUES
(LOAD_FILE(\"" << file_name << "\"))";
query.store();
That't work and it's quite quick. No more problems about escape!
Thanks, but this only works with files which are located on the same PC as
the MySQL Server is working on.
But I think I habe to look for FTP an Windows anyway.
P.S. Remember to check the "max_allowed_packet" mysql parameter, if you
have big files.