Hi Helen,

import oracle.sql.*;
...
BLOB blob = ((OracleResultSet)rs).getBLOB ("body");
CLOB clob = ((OracleResultSet)rs).getCLOB ("body");
...
file://read
Reader instream = clob.getCharacterStream();
InputStream instream = blob.getBinaryStream();
...
file://write
Writer outstream = clob.getCharacterOutputStream();
OutputStream outstream = blob.getBinaryOutputStream();


xgh
----- Original Message -----
From: helen ge
To: [EMAIL PROTECTED]
Sent: Thursday, June 15, 2000 10:26 PM
Subject: SQL question for long data type


Hi,
may be this is a simple question, but I stucked here.

I have an oracle table which has a long data type field named body.
in my java code I created a SQL and try to get that long field througn
ResultSet and print it out as a String.


String body = rs.getString("body");--- does not work.
long body = rs.getLong("body");--- does not work.
String body = (String) rs.getObject("body");-- not work.

How can I correctly doing that?

someone help me?

Thanks in advance

Helen



________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to