Results 1 to 1 of 1
- 10-08-2009, 12:47 PM #1
Member
- Join Date
- Sep 2009
- Location
- Italy, Turin
- Posts
- 39
- Rep Power
- 0
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:Java Code:myResultSet.updateBlob("MySQLLongBlobColumn", myBlobObject);
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...Java Code: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?
Similar Threads
-
Java Applet + File Uploading
By Moncleared in forum New To JavaReplies: 4Last Post: 02-02-2009, 06:33 PM -
uploading a file
By itssiva in forum Java ServletReplies: 4Last Post: 01-16-2009, 10:41 AM -
Uploading a file with Servlet
By farakhkhan@yahoo.com in forum New To JavaReplies: 0Last Post: 03-10-2008, 08:02 PM -
File Uploading
By aaliadhurue in forum Advanced JavaReplies: 4Last Post: 01-16-2008, 06:56 PM -
uploading sound file in java
By po0oker in forum Advanced JavaReplies: 8Last Post: 11-03-2007, 11:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks