Want to send CLOB/CLOB to Oracle AQ from Java

Discussion in 'Java' started by brian.vanheesch@gmail.com, Feb 15, 2006.

  1. Guest

    I have an Oracle type which includes a CLOB field. I have, in Java, a
    class which implements SQLData & defines writeSQL & readSQL, etc
    methods. I can receive all data types (including CLOB/BLOB), but
    cannot send CLOB/BLOB objects to an AQ.

    The interface defines writeClob(Clob c), but my question is how to
    construct the Clob object in java?

    Using Oracle's implementation of JDBC, I can do:

    CLOB c=CLOB.empty_lob();
    c.putString(0, "foobar");
    stream.writeClob(c);

    But get an "Invalid empty LOB operation" error since the LOB was not
    previous saved to the database.

    Do I need to INSERT the data into a database table first, then SELECT
    it from the table, just to publish it to an AQ? Then go back & DELETE
    it from the table?

    All of the examples I have found do not include CLOB/BLOB objects being
    saved to an AQ.

    bvh
    , Feb 15, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGlmZmlkZW50?=

    Oracle CLOB column

    =?Utf-8?B?RGlmZmlkZW50?=, Jun 7, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    2,345
    =?Utf-8?B?RGlmZmlkZW50?=
    Jun 7, 2005
  2. Replies:
    1
    Views:
    1,434
    RedGrittyBrick
    Sep 21, 2007
  3. Ken Chesak

    Oracle CLOB using DBI

    Ken Chesak, Jun 24, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    178
    Ron Reidy
    Jun 26, 2003
  4. Feyruz
    Replies:
    4
    Views:
    2,123
    Sherm Pendley
    Oct 14, 2005
  5. pavi
    Replies:
    0
    Views:
    1,316
Loading...

Share This Page