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.  JDBC Adapter: Dynamic SQL;; ORA-01006: bind variable does not exist

    Posted Tue May 23, 2006 01:08 PM

    I am trying to create a dynamic SQL statement

    1.) My first try was to write the complete SQL-Statement into the SQL-field

    UPDATE FT_MASTER SET master_value=‘ES01010101’ WHERE master_key=12

    that worked correctly

    2.) then I placed a SQL-Variable into the SQL-Field
    ${sqlString}

    I inserted a Input Field named sqlString into the input Parameterlist
    VARCHAR java.lang.string sqlString

    I run the service and I put the SQL-String into my parameter sqlString
    UPDATE FT_MASTER SET MASTER_VALUE=‘ES01010101’ WHERE MASTER_KEY=12

    I am receiving an error Message
    ORA-01006: bind variable does not exist

    Can somebody help me


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


  • 2.  RE: JDBC Adapter: Dynamic SQL;; ORA-01006: bind variable does not exist

    Posted Tue May 23, 2006 02:37 PM

    I found the error by myself.

    the bug was that I added a variable named sqlString to the parameterlist.

    If a variable (which will keep the complete SQL-String) is defined in the SQL-Field, it is automatically added by webMethods into the parameter Input List. You don’t have to add this parameter manually.

    So the correct steps are:
    a.) place a SQL-Variable into the SQL-Field e.g. ${sqlString}
    b.) webMethods adds automatically this variable to the Input-List
    c.) run the service. It will ask for input adapterservice/sqlString

    of course in previous steps the sqlString may be generated dynamically by various conditions.

    It would be a good job for webMethods to give more detailed examples and information in the JDBC-Adapters Guide.

    hope this helps someone


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


  • 3.  RE: JDBC Adapter: Dynamic SQL;; ORA-01006: bind variable does not exist

    Posted Wed May 24, 2006 04:30 PM

    Joe,

    I must ask: assuming that your SQL statement is indeed as simple as “UPDATE FT_MASTER SET master_value=‘ES01010101’ WHERE master_key=12,” why not just use the UpdateSQL Template?

    • Percio

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


  • 4.  RE: JDBC Adapter: Dynamic SQL;; ORA-01006: bind variable does not exist

    Posted Wed May 24, 2006 05:45 PM

    Joe,
    Also, if you need to update many records at a time, you can use UpdateBatchSQL template.


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


  • 5.  RE: JDBC Adapter: Dynamic SQL;; ORA-01006: bind variable does not exist

    Posted Wed May 24, 2006 07:04 PM

    Joe,

    The steps you have mentioned is the default behaviour of JDBC DynamicSQL template.Yes this basic info should have been there in the JDBC docs.

    Thanks for updating the query though.

    HTH,
    RMG


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