Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Java clob and casting to strings
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
![]() |
![]() |