Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    US
    Posts
    5

    Unanswered: ORA-01461: can bind a LONG values only for insert into LONG column

    Hi,

    I have a table which has 6-7 clob fields. The following is the way i am binding the query using the PreparedStatement

    String query1 = "insert into dsas_main(ID,NAME_FIRST,NAME_LAST,DEPT,POSITION,WO RK_PHONE,WORK_ADDR,FAX,EMAIL,";
    query1 += "WEB_PERSONAL,WEB_DEPT,KEYWORDS,NAID,EDUCATION,BOD Y,PRESENT,GRANTS,PATENTS,CONSULTING,SPECIAL,PUBLIC ATIONS,";
    query1 += "WORKS,DISPLAY,GAS,RESEARCH) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?)";



    bais = (InputStream)new java.io.ByteArrayInputStream(cl_education.getBytes ());
    psmt.setAsciiStream(14,bais,cl_education.length()) ;

    bais = (InputStream)new java.io.ByteArrayInputStream("".getBytes());
    psmt.setAsciiStream(15,bais,0);

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_presentations.getB ytes());
    psmt.setAsciiStream(16,bais,cl_presentations.lengt h());

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_grants.getBytes()) ;
    psmt.setAsciiStream(17,bais,cl_grants.length());

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_patents.getBytes() );
    psmt.setAsciiStream(18,bais,cl_patents.length());

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_consulting.getByte s());
    psmt.setAsciiStream(19,bais,cl_consulting.length() );

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_special.getBytes() );
    psmt.setAsciiStream(20,bais,cl_special.length());

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_publications.getBy tes());
    psmt.setAsciiStream(21,bais,cl_publications.length ());

    bais = (InputStream)new java.io.ByteArrayInputStream(cl_works.getBytes());
    psmt.setAsciiStream(22,bais,cl_works.length());


    int success=psmt.executeUpdate();

    The other fields are varchar fields which are working fine.

    The problem here is when i am trying to insert a long value
    that is much more data into the clob field. It is throwing the following exception

    Exception: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

    I am kinda stuck at this stage. Can anyone help me out here or can produce any other way to insert into the clob field.

    thanks much

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Symptoms:
    Error may occur
    ORA-1461
    Related To:
    JavaVM / JSP / Corba etc..
    Description


    Creating a procedure with a Java Stored Procedure call out
    with a signature larger the 4000 characters raises
    ORA-1461 while inserting into procedurejava$.


    --------------------------------------------------------------------------------
    The full bug text (if published) can be seen at <Bug:2608044>
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •