Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    4

    Unanswered: Problem inserting rows from Java

    Hi I got a question is there a posiblity that when you try to do an insert from a Java application you CAN NOT insert a value as long as the row definition says?
    I mean I want to insert a string with length 250 to a column with definition VARCHAR (250) and when I try to do the insert from the Java app, I get the following error
    Error: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0433N Value "BOM inserts = 36; Bom updates = 0; BOM deletes = 0; Props in" is too long. SQLSTATE=22001
    I do the same insert but with 249 length string and it works, of course I have checked the code and it is not adding an extra char (as a space or something like)

    When I try inserting from the AIX command line (the same query as in the java code) I can insert without troubles.

    I'm using DB2 V8.1.1.61 FixPack 6 ESE on AIX 5.2, and the java driver we are using is COM.ibm.db2.jdbc.app.DB2Driver

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    That error looks like it's coming from a user-defined function or stored procedure... are you sure DB2 is actually generating the error? Could be the procedure's length check isn't doing the right thing.
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Nov 2005
    Posts
    4
    I am getting this error in a java app and it is from DB2:
    Error: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0433N Value "BOM inserts = 36; Bom updates = 0; BOM deletes = 0; Props in" is too long. SQLSTATE=22001

    I'm using DB2 V8.1.1.61 FixPack 6 ESE on AIX 5.2, and the java driver we are using is COM.ibm.db2.jdbc.app.DB2Driver

    In the insert clause I have a value with 250 chars, and the column definition is 250 too.
    Actually, the same insert clause works fine from aix db2 command line, but not from a java db2 client ( like squirrel )
    from where I am getting the same error.
    Does anyone know why I cannot fill completely a field using java driver?

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Care to post the insert statement?

Posting Permissions

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