Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Java SP and LONG data question

Java SP and LONG data question

From: Ken Rachynski <krachyn_at_evansconsoles.com>
Date: Thu, 7 Dec 2000 21:27:15 +0000 (UTC)
Message-ID: <90039D490krachynec@207.228.64.17>

I'm working on a Java Stored Procedure that needs to query data which includes a LONG column. I am trying to write the results of the query to a CSV file and need to remove any carriage returns or line feeds or commas from the LONG data before I write it out to my file. So far this works nicely except when the LONG column is null. Using the java.sql.ResultSet.wasNull() method works properly for all columns except the LONG column. In that case, wasNull() returns true even if the column was indeed null.

Is there an alternative means of determining if the LONG column was in fact null?

An example of my code:

ResultSet rs = stmt.ExecuteQuery("select alongcolumn from mytable"); String tmp = rs.getString(1);
if (!rs.wasNull()) {
  tmp = tmp.replace('\n', ' ');
  tmp = tmp.replace(',', ' ');
}

Thanks in advance.

-- 
Ken Rachynski
Programmer
EVANS
http://evansonline.com/
Received on Thu Dec 07 2000 - 15:27:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US