Results 1 to 1 of 1
- 10-08-2009, 12:47 PM #1Member
- Join Date
- Sep 2009
- Italy, Turin
- Rep Power
problems uploading big file in LONGBLOB
i have to save big file.... up to 64 MB in a LONGBLOB field.
i cant use the mysql function LOAD_FILE() because the file i need to upload isn't in the same mysql server host.
I create a ResultSet which is CONCUR_UPDATABLE.. if i attempt to save the data in a java.sql.Blob object and then call:
FileInputStream fis = new FileInputStream(myFile); myResultSet.updateBlob("MySQLLongBlobColumn", fis);
last thing: i can't use directly the UPDATE SET WHERE sql command, because if i use an 8k buffer and i need to save in longblob field a 16MB size file i'll send to mysql server something like 2048 UPDATE query... just for one file... for the performance it's the worst thing to do...
What can i do?
- By Moncleared in forum New To JavaReplies: 4Last Post: 02-02-2009, 06:33 PM
- By itssiva in forum Java ServletReplies: 4Last Post: 01-16-2009, 10:41 AM
- By email@example.com in forum New To JavaReplies: 0Last Post: 03-10-2008, 08:02 PM
- By aaliadhurue in forum Advanced JavaReplies: 4Last Post: 01-16-2008, 06:56 PM
- By po0oker in forum Advanced JavaReplies: 8Last Post: 11-03-2007, 11:00 PM