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:
i receive a fantastic Heap Out of Memory... so i tried to:
and magicallly my UPDATABLE ResultSet, when i call the updateBlob() method become NOT UPDATABLE O_O throwing an exception which says that this ResultSet is not updatable... if i check the getConcurrency() method it return that myResultSet is CONCUR_UPDATABLE...:eek:.... i don't know what's going on in my JVM...
FileInputStream fis = new FileInputStream(myFile);
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?