inserting clob into oracle from java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: inserting clob into oracle from java

  1. #1
    reuben Guest

    inserting clob into oracle from java


    hi,
    i would like to insert a huge string value from my java servelet into an
    oracle database. i have a clob field in the databse for this purpose.

    i am unable to convert the string value to clob. anu clues would be appreciated.

    thanx in advance.
    bye,
    reuben.


  2. #2
    Syed Zulfiqar Guest

    Re: inserting clob into oracle from java


    Hi,
    I haven't worked with CLOB but I think u donīt create a clob directly out
    of some String, instead you first create a pointer to the column to which
    you wanīt to insert the CLOB into. That means that you first create an empty_clob
    into the db. Then you fetch this empty clob from the db and finally you write
    your stream into the clob. Vice versa if you would like to get the clob from
    the db, You select the lob, then you create an inputstream from there and
    read it into some outputstream.

    Hope this may give some clear understanding.

    Regards
    syed zulfiqar



    "reuben" <reubenjacob@hotmail.com> wrote:
    >
    >hi,
    >i would like to insert a huge string value from my java servelet into an
    >oracle database. i have a clob field in the databse for this purpose.
    >
    >i am unable to convert the string value to clob. anu clues would be appreciated.
    >
    >thanx in advance.
    >bye,
    >reuben.
    >



  3. #3
    Paul Clapham Guest

    Re: inserting clob into oracle from java

    When you look at the documentation for the Clob interface, it doesn't
    mention any methods for writing a stream into one. Reading a stream from
    one, yes, but not writing. The interface appears to be for read-only CLOBS,
    unless you can tell me the names of the methods that I didn't see.

    Syed Zulfiqar <query@edmail.com> wrote in message
    news:392a9330$1@news.devx.com...
    >
    > Hi,
    > I haven't worked with CLOB but I think u donīt create a clob directly

    out
    > of some String, instead you first create a pointer to the column to which
    > you wanīt to insert the CLOB into. That means that you first create an

    empty_clob
    > into the db. Then you fetch this empty clob from the db and finally you

    write
    > your stream into the clob. Vice versa if you would like to get the clob

    from
    > the db, You select the lob, then you create an inputstream from there and
    > read it into some outputstream.
    >
    > Hope this may give some clear understanding.
    >
    > Regards
    > syed zulfiqar
    >
    >
    >
    > "reuben" <reubenjacob@hotmail.com> wrote:
    > >
    > >hi,
    > >i would like to insert a huge string value from my java servelet into an
    > >oracle database. i have a clob field in the databse for this purpose.
    > >
    > >i am unable to convert the string value to clob. anu clues would be

    appreciated.
    > >
    > >thanx in advance.
    > >bye,
    > >reuben.
    > >

    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center