ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From puneet arya <puneet_arya_...@yahoo.co.in>
Subject Re: Null parameter value to stored procedure
Date Sat, 08 Jul 2006 12:00:48 GMT

    In ur sqlmap dao u can write   
IF(object != null) 
Do what ever u want
The object through which u r passing or getting value 

Other catch the exception through exception block . now it is upto u ki u want to catch exception
at sql level or java level.

Puneet Arya
yogisha.b@tcs.com wrote: Hi,

i am trying to pass null parameter value to stored procedure



            { call testStoredProc(#id#)}

sometimes id parameter value comes from the HashMap contains null value.

how ibatis handles this and how can i configure....? i am getting error
when i pass null value.

I tried with passing default value like this { call
testStoredProc(#id:NUMERIC:-1#)} and it works.

Question is without assigning default value for the parameter is there any
other way i can resolve this.

thanks in advance
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

 Find out what India is talking about on  Yahoo! Answers India.
 So, whatÂ’s NEW about the NEW Yahoo! Messenger? Find out.
View raw message