• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CallableStatement IN paramteres

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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!
 
Ken Robinson
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try different ways to 'set' the parameter, such as setNull or setObject. You may need to ask the acutall vendor or look at the driver docs to see how this is handled, if at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic