dcsimg
Problem in inserting document into database as a blob in tomcat server
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   elan_t
Posted On:   Friday, June 4, 2004 03:42 AM

Hi, I am inserting document into database as a blob. It is inserting successfully but we try to download it is not downloading. The insertion itself having some problem this code used for tomcat server String SQL_GET_BY_PK ="select document_blob from PMS_Documents where documentId="+ pmskey +" for update nowait" ; dbBlob = (oracle.sql.BLOB)rs.getBlob(1); inStream = new BufferedInputStream(form.getDocumentBlob().getInputStream()); //createDocument(inStream); outStream = dbBlob.getBinaryOutputStream(); while((len = inStream.read()) != -1) { outStream.write(len); fileSize += len; }    More>>

Hi,
I am inserting document into database as a blob. It is inserting successfully but we try to download it is not downloading. The insertion itself having some problem

this code used for tomcat server

String SQL_GET_BY_PK ="select document_blob from PMS_Documents where documentId="+ pmskey +" for update nowait" ;

dbBlob = (oracle.sql.BLOB)rs.getBlob(1);

inStream = new BufferedInputStream(form.getDocumentBlob().getInputStream());
//createDocument(inStream);
outStream = dbBlob.getBinaryOutputStream();
while((len = inStream.read()) != -1) {
outStream.write(len);
fileSize += len;
}

   <<Less
About | Sitemap | Contact