This content has been marked as final.
Show 1 reply
-
1. Re: saving images in Oracle
colinws Nov 27, 2002 5:36 AM (in response to mkent)I did this (for documents, rather than images, but exactly the same otherwise), by having a Document entity bean, which stored information about the file I was storing (such as it's name, size, mime-type, etc), and a DOCUMENT_DATA table in Oracle with a BLOB column that held the raw bytes of the file.
I chose this way so that I could do all the management stuff through EJB and CMR, but the BLOB stuff can't be done in EJB.
Connect the two halves by the same ID, and do servlet and JDBC stuff to retrieve the blob data when it's time to show it.
If you're uploading data, you'll need to do Oracle specific stuff if your fiels get over 4K. This is only a few extra lines of code though.