Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003

    Unanswered: CallableStatement IN paramteres


    Just a quick query about IN parameters that are passed to CallableStatements. If one (or more) of the parameters has a default value created in the stored procedures SQL, how is this reflected when using the CallableStatement?

    For example, if I use the following statement to create a CallableStatement object:

    {call test_order(?,?,?)}

    and the second parameter has a default value, do I have to set it anyway, or is there a way to just take the default value?

    I've tried setting the first and third parameters and not the second, but I get an SQLException thrown with the error "Invalid parameter binding(s)."

    Any help you can offer would be greatly appreciated!

  2. #2
    Join Date
    Jan 2004

    you need to set all the variables that are passed in a callable statement except if there is any return attribute from procedre.

    its good to pass the default value from the calling program rather than having in procedure.

  3. #3
    Join Date
    Nov 2003

    Re: CallableStatement IN paramteres

    HI ..Its good that you pass in default value... I had this problem some time back I stuck to sending default values from the bean. At a later point of time I had to change this only at particular geographicaly separated location. All I did was changed the bean only at that site. It came as great help....

    Keep things Simple as world is already complex

Posting Permissions

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