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

Home -> Community -> Usenet -> c.d.o.server -> Java clob and casting to strings

Java clob and casting to strings

From: Colin McGuire <colinandkaren_at_lycos.co.uk>
Date: 17 Jan 2003 08:54:50 -0800
Message-ID: <ab6cea37.0301170854.7817d966@posting.google.com>


Hi, the following code snippet provides two overloaded version of getOperationsLog(). The one that returns a value of type String works fine, the other contrived one, that returns a clob does't even compile. What I would like to do is implement a function that returns a clob also. How I do not want to do this is write out mOperationsLog to a temporary table and column, and then read it back; I would like to 'cast' it having no DB connection open. Is this at all possible? Thank you
Colin McGuire

 import oracle.sql.CLOB; //or even java.sql.Clob, I don't mind.  class Test
 {
  private static String mOperationsLog="";

  public static String getOperationsLog()
{

    return mOperationsLog;
  }

  public static oracle.sql.CLOB getOperationsLog()
{

    return (oracle.sql.CLOB)mOperationsLog;

         //this line above is syntactic rubbish but           
  }      //serves to explain what I want to do.

  //lots of other things not relevant to the question at hand.  } Received on Fri Jan 17 2003 - 10:54:50 CST

Original text of this message

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