Hi Danny,

> byte[] data = new byte[0];
> String sqlStmt = new String("select image from voti102 where ID = 1")

I hope some code was snipped because of inserting it in the mail ...

Statement s=connection.getStatement();
rs=executeQuery("select ... "); 

> if( rs.next() )
>            data = rs.getBytes("image");
> 
> rs.close();
> java.io.FileOutputStream fos = new FileOutputStream("test.jpg");
> fos.write(data);
> fos.close();

You should also look whether your query returned something - if not 
you are currently writing a file of size zero. Also, maybe using SQLStudio
to select the data, and using 'export cell to file' on the result may 
help you diagnosing what has failed on the insert (I assume something
did get wrong here ...)

Cheers
Alexander Schr�der
SAP DB, SAP Labs Berlin

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to