problem updating / appending blob data.
Posted by: Rodrigo Rey
Date: November 17, 2004 04:28PM

hey all.
I've been having diffuculty figuring out how to append data to a blob column.

I'm using mysql 4.1 and the latest connector/j driver.

I'm storing large amounts of data that will be varialbe up to 5GB. The only way to get around this without having an obscene amount of memory on the DB server, and without having to increase the max_packet_size variable is to stream the data in chunks....

one solution I have now, but I don't like, is storing each chunk in its own row of data... bleh!

what I want to do is create the row with the blob column. Then execute a Prepared statment with a 'for update' to get an updateable ResultSet back. and for each chunk of data get the blob from the ResultSet, and append the next chunk to the end of the blob and then call updateRow()

that way I only have one row of data for my blob instead of 50 rows...

but when I run my code, all I get is the last chunk of data, the update is overwriting it.

any ideas or solutions?


Options: ReplyQuote

Written By
problem updating / appending blob data.
November 17, 2004 04:28PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.