|
Hi everybody,
I found a solution to my problem.
I defined the table with blob externally from a sql
DDL instead of pf way
The following code worked.
I thought if anybody cares to see it will be
useful.
PreparedStatement
ps=MSpEDR03Jv.dbcon.prepareStatement("SELECT * FROM blobtest ");
ResultSet rs=ps.executeQuery(); Blob pics=null; while(rs.next()) { pics= rs.getBlob("PICTURE"); } // InputStream logoistrm=pics.getBinaryStream(); byte[] byteAry=pics.getBytes(1,(int) pics.length()); FileOutputStream fsfrmdb=new FileOutputStream("dbImage.gif"); fsfrmdb.write(byteAry); // logoistrm.read(byteAry); ImageIcon dbImage=new ImageIcon("dbImage.gif"); Kaush
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.