View Single Post
  #5 (permalink)  
Old April 16th, 2008, 01:11 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Abhishek -

As Sam has suggested, you can create nullable program side variables. When it comes to passing those values to the DB, you'll need to provide a little logic. Test the var for null, then either provide DBNull.Value or the actual integer. If your sproc supports a default of null for that parameter, then you don't even need to provide it.

-Peter
peterlanoie.blog