• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Store Procedure in Spring

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling a store procedure from Spring(extending MappingSqlQuery)
and that procedure has one of the parameters as optional (eg @iD Integer = null).I am using Sybase and my question is how do you pass null from Java knowing that its an Integer? I tried to do this Integer x =null and pass x as teh param but give me exceptions.can anyone pls help me.
thanks
aziz
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the DB procedure signature specifies that a parameter is optional and has a default value specified as well, are we required to pass it in when calling fro java?

Did you check java.sql.Types.NULL ?
[ November 30, 2005: Message edited by: Karthik Guru ]
 
rahul karwal
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes we are required to pass in the parameter or spring is complaining.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!