3 messages in com.mysql.lists.plusplusRe: Uploading blobs, performance, som...
FromSent OnAttachments
Franz Alt24 Sep 2002 07:14 
Alessandro Peverelli24 Sep 2002 08:03 
Franz Alt24 Sep 2002 13:23 
Subject:Re: Uploading blobs, performance, some C++
From:Franz Alt (fran@pfaffenhofen.de)
Date:09/24/2002 01:23:09 PM
List:com.mysql.lists.plusplus

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.