OK,

Of course I should translate it in my first message, I'm relly sorry about my
sillyness.

Here is it as translated:
statement: begin ? := test.tst3; end; : java.sql.SQLException: ORA-06550: line
1, column 35: PLS-00382: expression is of wrong
type ORA-06550: line 1, column 15: PL/SQL: Statement ignored

Here is an oracle snippet found in manual: 'Oracle8i JDBC Developer's Guide and
Reference
Release 8.1.5 A64685-01' I'm not sure if it works

Example: Getting BLOB and CLOB Locators from a Result Set
Assume the database has a table called lob_table with a column for a BLOB
locator,
blob_col, and a column for a CLOB locator, clob_col.
This example assumes that you have already created the Statement object, stmt.

First, select the LOB locators into a standard result set,
then get the LOB data into appropriate Java classes:

// Select LOB locator into standard result set.
ResultSet rs =
   stmt.executeQuery ("SELECT blob_col, clob_col FROM lob_table");
while (rs.next())
{
   // Get LOB locators into Java wrapper classes.
   oracle.jdbc2.Blob blob = (oracle.jdbc2.Blob)rs.getObject(1);
   oracle.jdbc2.Clob clob = (oracle.jdbc2.Clob)rs.getObject(2);
   [...process...]
}


The output is cast to oracle.jdbc2.Blob and Clob. As an alternative,
you can cast the output to oracle.sql.BLOB and CLOB to take advantage of
extended functionality offered by the oracle.sql.* classes.
For example, you can rewrite the above code to get the LOB locators as:

   // Get LOB locators into Java wrapper classes.
   oracle.sql.BLOB blob = (BLOB)rs.getObject(1);
   oracle.sql.CLOB clob = (CLOB)rs.getObject(2);
   [...process...]

Example: Getting a CLOB Locator from a Callable Statement
The callable statement methods for retrieving LOBs are identical to the result
set methods.
In the case of a callable statement, register the output parameter as
OracleTypes.BLOB or OracleTypes.CLOB.

For example, if you have an OracleCallableStatement ocs that calls a function
func that
has a CLOB output parameter, then set up the callable statement as follows:

OracleCallableStatement ocs =
   (OracleCallableStatement)conn.prepareCall("{? = call func()}")
ocs.registerOutParameter(1, OracleTypes.CLOB);
ocs.executeQuery()
oracle.sql.CLOB clob = ocs.getCLOB(1);

//Jarmo





Christian Haul <[EMAIL PROTECTED]> on 07/05/2002 03:37:45 PM

Please respond to [EMAIL PROTECTED]; Please respond to
      [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Jarmo Blomster/CCC)
Subject:  Re: PLSQL function returning CLOB




On 05.Jul.2002 -- 03:07 PM, [EMAIL PROTECTED] wrote:
> Sorry about the finnish
> statement: begin ? := test.tst3; end; : java.sql.SQLException: ORA-06550: rivi
> 1, sarake 35: PLS-00382: lauseke on väärän tyyppinen ORA-06550: rivi 1, sarake
> 15: PL/SQL: Statement ignored

It would really help to understand the error message. There should be
a locale setting for your connection.

Another helpful thing would be a sample java code that would achieve
the same as you're trying to do. Maybe Oracle provides some snippets?

     Chris.
--
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

###########################################
This message has been scanned by Sonera Anti-Virus Service.
No viruses has been found.





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to