|
Re: Uploading blobs, performance, some C++: msg#00057db.mysql.c++
> 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. -- franz.alt@xxxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Uploading blobs, performance, some C++: 00057, Alessandro Peverelli |
|---|---|
| Next by Date: | 欢迎进入温州商业网: 00057, 温州商业网 |
| Previous by Thread: | Re: Uploading blobs, performance, some C++i: 00057, Alessandro Peverelli |
| Next by Thread: | 欢迎进入温州商业网: 00057, 温州商业网 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |