Connection conn = getConnection();
Statement stmt = conn.createStatement();
stmt.execute("select blob_column from blob_table");
ResultSet rs = stmt.getResultSet();
while (rs.next())
{
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
int n=0;
InputStream in = rs.getBinaryStream("blob_column");
while((n = in.read()) != -1)
{
bos.write(n);
}
System.out.println(bos.toString());
}
Hope it helps
Ram�n Crespo
-----Mensaje original-----
De: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]En nombre de Daniel Jaffa
Enviado el: martes, 13 de noviembre de 2001 22:03
Para: [EMAIL PROTECTED]
Asunto: Help with BLOB
Could some one post an example of:
running a query like select blobcolum from x
then reading the resultset and printing out the blob
The blob would be a text file
thank you very much
Daniel Jaffa
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com