db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cld71 <cl...@hotmail.com>
Subject Derby Blob
Date Thu, 28 Aug 2008 15:52:43 GMT

I am uploading a file using apache commons fileupload.
I am trying to store the file in a derby blob field.
The file is zipped with a pdf file as a zip entry.
After uploading the file, then I test the file by downloading it and the
downloaded file gives me errors.
To test what the problem is, I saved the uploaded file in a temp location
using the same methods as loading the blob, and the temp file works find.
Here is a code example:

byte[] data = item.
SerialBlob sb = new SerialBlob(data);
PreparedStatement ps = connection.prepareStatment("insert into
my_file(file_name, the_file) values(?,?)");

View this message in context: http://www.nabble.com/Derby-Blob-tp19203507p19203507.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message