IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  ORA-01008: not all variables bound

    Posted Mon June 27, 2005 02:16 PM

    Hi Everyone!

    I’ve created a JDBC adapter service with the following custom SQL insert statement and is getting this error (“ORA-01008: not all variables bound”). This statement works fine when i tested in Toad (replacing ? with values). Any help would be greatly appreciate it.

    INSERT INTO TEST_TABLE (
    TEST_ID, PARTNER_ID, PARTY_ID,
    ADDRESS1, ADDRESS2, ADDRESS3,
    CITY, REGION, ZIP_CODE, COUNTRY, RECEIVE_DT )
    VALUES ( ?, ?, ?,
    DECODE(GREATEST(LENGTH(?),50),50,?,SUBSTR(?,1,50)),
    DECODE(GREATEST(LENGTH(?),50),50,?,SUBSTR(?,1,50)),
    DECODE(GREATEST(LENGTH(?),50),50,?,SUBSTR(?,1,50)),
    ?, ?, ?, ?, SYSDATE )


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 2.  RE: ORA-01008: not all variables bound

    Posted Tue June 28, 2005 11:40 AM

    Be sure you are providing a value for each of the sixteen (16) bind variables (“?” - question marks) in your SQL statement. You may be forgetting that there are 3 bind variables in each of the DECODE functions for the address fields in your statement.

    Allen.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: ORA-01008: not all variables bound

    Posted Tue June 28, 2005 12:31 PM

    Thanks Allen. You’re right, i needed to add the 3 binding variables in each of the DECODE functions for the address fields in my statement. That fixed the “ORA-01008: not all variables bound” error. But now, i’m getting “ORA-01401: inserted value too large for column”. Not sure why the error, since the functions in the statement should truncate the values. Any idea?


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: ORA-01008: not all variables bound

    Posted Tue June 28, 2005 01:55 PM

    Okay, got it to work. Needed to remove TEST_ID from sql statement and remove RECEIVE_DT from the input. Then it works fine. Thanks again.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards