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:
Java Code:
myResultSet.updateBlob("MySQLLongBlobColumn", myBlobObject);
i receive a fantastic Heap Out of Memory... so i tried to:

Java Code:
FileInputStream fis = new FileInputStream(myFile);
myResultSet.updateBlob("MySQLLongBlobColumn", fis);
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...

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?