• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CallableStatement IN paramteres

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic