Loading UTF-8 String into CLOB column

Hello!
I am trying to load UTF-8 encoded strings into a CLOB column in an Oracle 9i database from VB.Net using ODP.Net (9.2.0.414).
The strings are XML snippets (Microsoft WordML to be precise). Each corresponds to a record which already exists in the database, therefore I do an update to add the UTF-8 string.
Some of the XML snippets contain characters which once inserted look like upside down question marks (characters represented by 0x92 and 0x96 for example end up as 0xBF once in the database).
Setting breakpoints in Visual Studio, I can watch the string values in the 'Locals' window and they appear correct (in fact I can copy from the 'Locals' window and using a tool such as TOAD can paste the strings into the database successfully). Pasting through TOAD, the characters are properly represented in the database (ie 0x92 is 0x92).
I've tried a number of approaches with no luck.
Any advice/suggestion are most welcome. Thanks!
Here is my code:
strConnectionString = ConfigurationSettings.AppSettings.Item("ConnectionString")
strComponentsTable = ConfigurationSettings.AppSettings.Item("ComponentsTable")
objConnection = New OracleConnection(strConnectionString)
objCommand = objConnection.CreateCommand()
objCommand.CommandType = CommandType.Text
objCommand.CommandText = "UPDATE " & strComponentsTable & " SET TEMPLATE_COMPONENT_CONTENT = :p_content WHERE TEMPLATE_COMPONENT_ID = :p_id"
objConnection.Open()
For Each strId In objComponents.Keys
strContent = objComponents.Item(strId)
objCommand.Parameters.Clear()
objParameter = objCommand.CreateParameter()
objParameter.ParameterName = "p_content"
objParameter.OracleDbType = OracleDbType.Clob
objParameter.Direction = ParameterDirection.Input
objParameter.Value = strContent
objCommand.Parameters.Add(objParameter)
objParameter = objCommand.CreateParameter()
objParameter.ParameterName = "p_id"
objParameter.OracleDbType = OracleDbType.Int32
objParameter.Direction = ParameterDirection.Input
objParameter.Value = CInt(strId)
objCommand.Parameters.Add(objParameter)
intResult = objCommand.ExecuteNonQuery()
Next

Some further research has revealed the following:
Two of the characters I provided as examples of not being stored properly in the database are (in Unicode) U+2013 and U=2019. These characters, encoded as UTF-8 should each be three bytes (0xE2 80 93 and 0xE2 80 99 respectively). Sent via VB.Net and ODP.Net they both end up in the database as one byte each (0xBF). Copy and Pasted via TOAD they end up as one byte each (0x92 and 0x96 respectively).
The NLS settings on the server side are:
NLS_CHARACTERSET = WE8ISO8859P1
NLS_NCHAR_CHARACTERSET = AL16UTF16
I have tried using both CLOB and NCLOB column with the results being identical.
Not sure what else to try...

Similar Messages

  • How to read/write .CSV file into CLOB column in a table of Oracle 10g

    I have a requirement which is nothing but a table has two column
    create table emp_data (empid number, report clob)
    Here REPORT column is CLOB data type which used to load the data from the .csv file.
    The requirement here is
    1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
    2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
    eg: empid report_field1 report_field2
    1 x y
    Any help would be appreciated.

    If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
    It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
    To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
    declare
        lt_report_clob CLOB;
        l_max_line_length integer := 1024;   -- set as high as the longest line in your file
        l_infile UTL_FILE.file_type;
        l_buffer varchar2(1024);
        l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
        l_filename varchar2(200) := 'my_file_name.csv';   -- get this from somewhere
    begin
       -- open the file; we assume an Oracle directory has already been created
        l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
        -- initialise the empty clob
        dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
        loop
          begin
             utl_file.get_line(l_infile, l_buffer);
             dbms_lob.append(lt_report_clob, l_buffer);
          exception
             when no_data_found then
                 exit;
          end;
        end loop;
        insert into report_table (emp_id, report)
        values (l_emp_id, lt_report_clob);
        -- free the temporary lob
        dbms_lob.freetemporary(lt_report_clob);
       -- close the file
       UTL_FILE.fclose(l_infile);
    end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
    There is at least one other possibility:
    - you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
    That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
    HTH
    Regards Nigel
    Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...

  • How to Store Encrypted String into OracleDatabase Column(vacrchar2)

    Hi..
    I encountered an error while inserting a Encryted String into oracle column.. Error "Quoted String Doesn't terminated properly"
    But i wrote Query string correctly and using Datatypes as String and vacharchar2(2000) in java and oracle respectively..
    what i need to do?

    Hi,
    if your code compose the sql programmatically without bind variables i.e.:
    String sqlInsert="insert into table A(encrypted_column) values ('" + encryptedValue+ ')");
    then if the string encryptedValue contains a ' character you end up with a wrong sql statement
    if you encryped values is something like AAABB#??£££'AAA the corresponding sql is
    insert into table A(encrypted_column) values ('AAABB#??£££'AAA')
    which is not correct becaus of the ' in the middle of the string.
    Giovanni

  • How to insert a very long string into a column of datatype 'LONG'

    Can anyone please tell me how can I insert a very long string into a column of datatype 'LONG'?
    I get the error, ORA-01704: string literal too long when I try to insert the value into the table.
    Since it is an old database, I cannot change the datatype of the column. And I see that the this column already contains strings which are very long.
    I know this can be done using bind variables but dont know how to use it in a simple query.
    Also is there any other way to do it?

    Hello,
    To preserve formatting in this forum, please enclose your code output between \ tags. And when executing you code as a pl/sql or sql script
    include following lineset define off;
         Your code or output goes here
      \Regards
    OrionNet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Breaking the string into different columns

    Hi Guys,
    I need to break the following string into different columns
    'XXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007.'
    I am trying to write it using instr and substr , but having some issues .
    Is there any other way to do this. If not can someone help me , below is the query that i am working on
    SELECT SUBSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', 1, INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', 1) - 1) col1,
    SUBSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007',
    INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', 1) + 1,
    INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', 1, 2)
    - INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', 1)
    - 1
    ) col2,
    SUBSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007',
    INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', -1, 2) + 1,
    INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', -1, 1)
    - INSTR ('XXXXXX.0001.09011.0001.00002.03.0004.0005.0006.00007', '.', -1, 2)
    - 1
    ) col3
    from dual
    It is very urgent.
    Thanks in advance.

    npejavar wrote:
    It is very urgent.
    It doesn't look urgent, you could simply read the manuals for instr and substr or describe any issues or errors you are having, or post sample data so people could help you more easily, or format your code so it is more readable, but you don't bother to do any of those things so if it isn't important to you to extend any effort, why would it be important to us?
    If it was really urgent it would be a violation of the conditions of use of these forums.
    http://www.catb.org/esr/faqs/smart-questions.html#urgent
    http://www.oracle.com/html/terms.html
    >
    4. Use of Community Services
    Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
    You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle

  • How to Splilit The String Into Single Column using Comma As Delimiter ?

    How to Splilit The String Into Single Column using Comma As Delimiter ?
    using Function

    refer my thread ,code is also available see if that helps you
    error while executing the sp ORA-21779: duration not active

  • Read text file into clob column

    Dear Oracle users and Oracle support,
    I have a text file that includes hundreds of data entries. The format is below. What I need to do is read each entry (
    <DATALOAD ................</DATALOAD>) into the CLOB column as a table record. Then create a loop in the table to convert each record into XML data type. I have general idea on how to convert CLOB to XML. The difficult part to me is read the each entry in the text file to CLOB table. Please let me know what technique I should use. Any recommendation and sample code are welcome! I appreciate!
    Thanks,
    Bing
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>

    RBYL wrote:
    Hi,
    Thank you for your response. What I want to achieve is read the text file into ClOB column. There are hundreds reocords in the text file. The format is below. Each entry is '<DATALOAD (sensitive data here, use....... instead)</DATALOAD>' that needs to be read into clob table as a record. That is basically what I need to achieve.
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>
    hundreds of them here........
    <DATALOAD ................</DATALOAD>
    <DATALOAD ................</DATALOAD>So, is it really a text file or is it a well structured XML file?
    Just reading it into a CLOB to process is not likely to be the best way.
    If each line of the file is a record, then you're likely to be better using something like External Tables.
    If it's a structured XML file, then it can be read using CLOB functionality into an XMLTYPE datatype and then shredded down into relational table structures.
    Be more clear in what your requirements are and we can help you better.
    {message:id=9360002}

  • Insert string into date column

    I'm writing a bash script that is supposed to insert a series of strings into a table. Problem is I may not know which column the date is in, so I don't want to hard code a to_date function in there.
    For instance this row may come in to be inserted:
    "06-APR-10 08:51:12","data","data","data","data","data","data","data","data"
    Assuming the data is in the proper order, I'm just going to sub out the "," for ',' which will let me insert everything just fine, except obviously it borks on the date.
    How do I insert the date this way as a string using the default internal call to to_date?? I know I can do it with '06-APR-10' and it works, but I need to get a little more specific with hour minute and second.

    user12947249 wrote:
    I'm writing a bash script that is supposed to insert a series of strings into a table. Problem is I may not know which column the date is in, so I don't want to hard code a to_date function in there.If you don't know which string maps to which column, how do you expect to have any data reliability? Even if you manage to load the data without error, how can an application make any sense of it?
    I'm curious because if you have a method to map the columns, that could be used to help you (maybe) and if you don't have a method ... then i don't see this post as being your number one problem :)

  • How to load externl files (PDF) into BLOB column.  Please help.

    Hi All,
    I've currently been working on loading many external binary files (PDF) into BLOB column. After some digging, I learn that the SQL*LOADER can be used to load data from external files into table. I also got help from another forummate mentioning to use PL/SQL procedure to do so. Since I have not done anything like this before. So, my question is what is the simple approach needed to upload PDF files into a table(there is only one table containing BLOB column in my database). In addition, the LOBs can not be query-able, I wanted to list the contents of the LOBs column to make sure that I did successfully upload data into the database. How can I do that?. I do need your help. Please direct me step by step how to do so. Your help is greatly appreciated.
    Regards,
    Trang

    Hi,
    If the following link helps to you then great.
    http://www.exefind.com/oralobeditor-P25468.html
    Regards,
    Sailaja

  • Fetching a text file into CLOB column in Oracle!

    Can anyone please help me to find out how to fetch a text file present on the network on to the CLOB column in Oracle 8i?
    I dont want to use BFILE for this.
    Please help its urgent.
    Love
    Prathab
    null

    Prathab,
    This is an example from the SQL package doc for DBMS_LOB, that reads from a bfile, and store in a lob.
    CREATE OR REPLACE PROCEDURE Example_l2f IS
    lobd BLOB;
    fils BFILE := BFILENAME('SOME_DIR_OBJ','some_file');
    amt INTEGER := 4000;
    BEGIN
    SELECT b_lob INTO lobd FROM lob_table WHERE key_value = 42 FOR UPDATE;
    dbms_lob.fileopen(fils, dbms_lob.file_readonly);
    dbms_lob.loadfromfile(lobd, fils, amt);
    COMMIT;
    dbms_lob.fileclose(fils);
    END;
    Hope it helps.
    Eric
    null

  • Insert XMLTYPE data into CLOB column

    Hi,
    I am trying to insert XMLTYPE datatype column value into the CLOB datatype column.
    I get an error -
    ORA - 00932: Inconsistent datatypes: expected CLOB got -
    How do I insert xml type data into clob?
    Thanks!

    Here is my sql code:
    I have a view :
    create or replace view test_view
    (id,
    code,
    desc)
    as select
    id,
    code,
    xmlroot(xmlelement("empname", ename), version '1.0') as desc
    from employee;
    I have a table emp_details_table. The columns in the emp_details_table are
    ID number,
    CODE varchar2,
    EMP_DETAILS CLOB
    I am tring to insert the 'test_view' data into the 'emp_details_table' and I get an error cannot insert xmltype data into clob.
    insert into emp_details_table
    (ID , CODE, EMP_DETAILS)
    select
    (ID, CODE, DESC) from test_view;
    Thanks.

  • Can SQL*Loader Insert concatenated string into table

    Hi All,
    I want to insert a column, whose format is "abc" + to_char(sysdate,'YYYYMMDD'), into temp table. How can I do it? Thank you in advance.
    Best Regards,
    Sheng

    Hi Lukasz,
    Thank you for your help! The "abc" is a constant string, it isn't a column. And I use concat function to solve the problem. like this
    LOAD DATA
    INFILE data.txt
    INTO TABLE tmp_table
    fields terminated by "," optionally enclosed by '"'
    ( c1 "concat('abc',TO_CHAR(SYSDATE, 'YYYYMMDD'))"
    Sheng
    Edited by: Sheng on 2013-5-26 下午4:44

  • Parse string into different column and optimization

    We are in process of building an audit process for any changes that occur automatically or manually by the user on some of the table data. To do this we have two options:
    1. Have master table to store the audit event summary and a detail table to store each column change with old and new values. Something like:
    CREATE TABLE TEST_ADT_DTL
      EVNT_ID      NUMBER,
      COL_NAME     VARCHAR2(1000),
      OLD_COL_VAL     VARCHAR2(1000),
      NEW_COL_VAL     VARCHAR2(1000)
    );but this approach has some processing overhead since for the changes to each record there will be multiple records based on number of columns updated. If we are loading 40K transaction twice a month, and the changes are almost 30-40% so the detail table will grow considerably.
    2. To have the detail table with one column that will have a concatenated string of changes with field name, old and new values.
    CREATE TABLE TEST_ADT_EVNT
      EVNT_ID        NUMBER,
      TBL_NAME       VARCHAR2(100),
      OPER_CD        VARCHAR2(1),
      USR_ID         VARCHAR2(10),
      ACT_DT         DATE,
      PK_STRNG_VAL   VARCHAR2(100),
      CMNT_TXT       VARCHAR2(1000) 
    CREATE TABLE TEST_ADT_DTL
      EVNT_ID      NUMBER,
      ADT_LOG     VARCHAR2(1000)
    INSERT INTO TEST_ADT_EVNT VALUES (1, 'CUSTOMER', 'A', 'ABC', SYSDATE, 'CUS0001', 'SOME COMMENT');
    INSERT INTO TEST_ADT_EVNT VALUES (2, 'CUSTOMER', 'U', 'ABC', SYSDATE, 'CUS0001', 'SOME COMMENT');
    INSERT INTO TEST_ADT_EVNT VALUES (3, 'ORDER', 'A', 'XYZ', SYSDATE, 'CUS0002', 'SOME COMMENT');
    INSERT INTO TEST_ADT_EVNT VALUES (4, 'ORDER', 'U', 'EFG', SYSDATE, 'CUS0002', 'SOME COMMENT');
    INSERT INTO TEST_ADT_EVNT VALUES (5, 'ORDER', 'U', 'XYZ', SYSDATE, 'CUS0002', 'SOME COMMENT');
    INSERT INTO TEST_ADT_DTL VALUES (2, 'FIELD:CITY,OLD:AVENEL,NEW:EDISON;FIELD:ZIP,OLD:07001,NEW:07056;');
    INSERT INTO TEST_ADT_DTL VALUES (4, 'FIELD:ADDRESS,OLD:234 ROGER ST,NEW:124 WEST FIELD AVE;FIELD:STATE,OLD:NJ,NEW:NY;FIELD:PHONE,OLD:,NEW:2012230912;');
    INSERT INTO TEST_ADT_DTL VALUES (5, 'FIELD:MID_NAME,OLD:,NEW:JASON;FIELD:ADDRESS,OLD:,NEW:3 COURT CT;');
    COMMIT;I want to know if we want to generate a report for audit log, how can I display the data from detail table in columns. I mean how to parse the ADT_LOG column to show the data in three different columns like:
    FIELD     OLD         NEW
    CITY     AVENEL    EDISON
    ZIP       07001      07056
    .along with the columns from EVNT table.
    And, want to know which approach would be better.

    hey I think I finally got it using the model clause.
    not sure if this will be faster or not.
    you can increase the number of iterations if you are not hitting them all,
    ( the lower your iteration number the faster this will run)
    select adt_log, field, old, new from
    with TEST_ADT_DTL as
    (select 2 evnt_id, 'FIELD:CITY,OLD:AVENEL,NEW:EDISON;FIELD:ZIP,OLD:07001,NEW:07056;' ADT_LOG FROM DUAL UNION
    select 4, 'FIELD:ADDRESS,OLD:234 ROGER ST,NEW:124 WEST FIELD AVE;FIELD:STATE,OLD:NJ,NEW:NY;FIELD:PHONE,OLD:,NEW:2012230912;' from dual union
    select 5, 'FIELD:MID_NAME,OLD:,NEW:JASON;FIELD:ADDRESS,OLD:,NEW:3 COURT CT;' from dual
    select evnt_id, adt_log, field, old, new  from test_adt_dtl
    model return updated rows
    partition by (evnt_id)
    dimension by ( 0 d)
    measures (adt_log, adt_log field, adt_log old, adt_log new, 0 it_num )
    rules iterate (50) -- until ?
    adt_log[any] = adt_log[0],
    field[0] = substr(adt_log[0], instr(adt_log[0],'FIELD',1,1)+6, instr(adt_log[0],',',1,1) - instr(adt_log[0],'FIELD',1,1)-6),
    old[0] =   substr(adt_log[0], instr(adt_log[0],'OLD',1,1)+4, instr(adt_log[0],',',1,2) - instr(adt_log[0],'OLD',1,1)-4),
    new[0] =   substr(adt_log[0], instr(adt_log[0],'NEW',1,1)+4, instr(adt_log[0],';',1,1) - instr(adt_log[0],'NEW',1,1)-4),
    field[iteration_number ] =    substr(adt_log[0],
                                         instr(adt_log[0],'FIELD:',1,iteration_number + 1 ) + 6,
                                         (instr(adt_log[0],',',( instr(adt_log[0],'FIELD:',1,iteration_number + 1 ) + 6 ),1)
                                         (  instr(adt_log[0],'FIELD:',1,iteration_number + 1 ) + 6))
    old[iteration_number ] =    substr(adt_log[0],
                                         instr(adt_log[0],'OLD:',1,iteration_number + 1 ) + 4,
                                         (instr(adt_log[0],',',( instr(adt_log[0],'OLD:',1,iteration_number + 1 ) + 4 ),1)
                                         (  instr(adt_log[0],'OLD:',1,iteration_number + 1 ) + 4))
    new[iteration_number]  =    substr(adt_log[0],
                                         instr(adt_log[0],'NEW:',1,iteration_number + 1 ) + 4,
                                           (instr(adt_log[0],';',1,iteration_number + 1)
                                           (instr(adt_log[0],'NEW:',1,iteration_number + 1 ) + 4)
    order by evnt_id, it_num
    where new is not nullEdited by: pollywog on Apr 13, 2010 10:28 AM

  • Split string into new column

    Hi All,
    Hoping you are able to help.
    I have a table of approx 16 items that I need to split,
    EG:
    CUSTOMER ACCEPTANCE - HAS BEEN DECLINED - DO NOT APPLY TO ACCOUNT
    CUSTOMER ACCEPTANCE -  HAS BEEN ACCEPTED - APPLY TO ACCOUNT
    CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED - RAISED IN PORTAL
    ESCALATION - RAISED - PENDING
    ESCALATION - NOT RAISED - STILL TO BE PROCESSED
    I need to Keep the first two sections, eg CUSTOMER ACCEPTANCE - HAS BEEN DECLINED in one column, and split off the remaining, eg DO NOT APPLY TO ACCOUNT into a new TEMP table to insert as a column into an existing table.
    With little SQL experience, I am having difficulties as they are all of different lengths / criteria etc. Some have 3 hyphens whilst others have 4+
    Is anyone able to help point me in the right direction with this request? I will be greatly appreciated.
    Kind Regards,
    BTMMP

    If you're trying to do this all in a SQL query or stored procedure, then you'll probably get better results on the SQL Server forums. However, if you're working with a PowerShell or VBScript that's doing the work, you're in the right place.
    Here's one example of how you could do what you're describing.  By the way, what do you want to do with the string "CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED - RAISED IN PORTAL"?  Should that be split into "CUSTOMER ACCEPTANCE
    - PENDING DECLINE" and "ESCALATION REQUIRED - RAISED IN PORTAL", or "CUSTOMER ACCEPTANCE - PENDING DECLINE - ESCALATION REQUIRED" and "RAISED IN PORTAL"?
    (In other words, should the script only split off whatever's after the final hyphen, or should it grab the first two pieces of text and split off everything else?)
    Here's an example in PowerShell which assumes that you want to separate out all text after the final hyphen in a string.  It uses a regular expression, though you could accomplish the same thing with Split, Join and Trim operations, if you prefer.
    $string = 'CUSTOMER ACCEPTANCE - HAS BEEN ACCEPTED - APPLY TO ACCOUNT'
    if ($string -match '(.*?)\s*-\s*([^-]*)$')
    $split = $matches[1], $matches[2]
    else
    $split = $string, ''
    Write-Host "Original String: $string"
    Write-Host "First Text : $($split[0])"
    Write-Host "Second Text : $($split[1])"

  • How to convert String into Clob in Java?

    Hi all,
    from a form i have a
    String body = request.getParameter("body_name");
    i want to insert the string body to a clob field in oracle.
    string is from a textarea where the user enter html contents and i want to storeit as a clob in the database.
    can anybody help ?
    I have done with setCharaceteStream(), but it will take only 4000 characters. which suppose to take upto 4GB limit.
    So I want to set it as stmt.setClob(" some form by using String")
    Pls. help me if you can?
    thanks in advance
    Srikanth

    Have you tried using setString?
    null

Maybe you are looking for