This is how I typically do it and it works well.. I store in blob
rows/sizes of 64k
byte bbfull = new byte;
// load up bbfull however you are going to (typically inputstream)
// create a prepared statement using a simple SQL insert query
// use setBytes to set the correct column and execute
On Fri, 25 Jul 2003, Rhino wrote:
> Can anyone sent me or point me to an example of a program that inserts a file like a
> JPEG or GIF into a Blob column of a MySQL table via a Java program?
> I have several years of experience with DB2 and can do this task in a Java program
> that talks to DB2 but the same program, modified to insert data into a MySQL table,
> doesn't seem to be working. There are no error messages but when I look at the table row,
> instead of a long string of hex digits, I get a few characters, like >
> Can anyone help me with a working example of inserting a Blob? That should help me
> figure out what needs to be done differently for MySQL than DB2. Or would you prefer that
> I post my code so that you can help me figure out what I'm doing incorrectly?
> rhino1 AT sympatico DOT ca
> "If you want the best seat in the house, you'll have to move the cat."