View Single Post
  #1 (permalink)  
Old April 16th, 2008, 12:35 AM
abhishekkashyap27 abhishekkashyap27 is offline
Authorized User
 
Join Date: May 2007
Location: Hyderabad, Andhra Pradesh, India.
Posts: 95
Thanks: 5
Thanked 0 Times in 0 Posts
Default Passing null value to integer

Hi All

I just need a little bit of clarification.I m using C# as a language, Sql Server 2005 as database. I am developing a web application where i need to pass integer as a null value.

Here is the piece of code:

Int32 IntLevel; /* declaring IntLevel as an integer */
IntLevel = dbnull.value;

dbnull.value here doesnt work, i have declared it and i do have to pass a value to it but it should be null in order to retreive all the records of Level Column.Level column contains thousands of integer values starting from 0,1,2....., etc.

Please advise, is there any possiblity to pass null value to an integer from C# side.



-- Abhishek