View Single Post
  #2 (permalink)  
Old August 30th, 2007, 07:37 AM
shakti_2505270 shakti_2505270 is offline
Authorized User
Join Date: Aug 2007
Location: mumbai, maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

hi Aaron
this is Shakti, i work as Software Programmer.

Your query can be easily solved.
You dont have to define a nullable variable.
Just define a variable of ur required type, in this case integer.

the code goes like this (the code has been written in C#, u can transform it to VB)

int i;
if(myDataReader("myPossiblyNullField")==DBNULL.Val ue)
i=0;// whatever the value u want to pass for null database values.

hope u find it helpful.
reply ur comments.