Posted on: 10/26/2012 1:54:57 AM | Views : 201

Dear Sir
I am getting error when i fetch null values from database .Please refer the code below.How to fix the issue.
string ID = dr["ID"].ToString();
string Pen = dr["Name"].ToString();
StatusType Status = (StatusType)System.Enum.Parse(typeof(StatusType),(string)dr["Status"]);
int age = Convert.ToInt32(dr["Age"].ToString());
PensionInfo pe = new PensionInfo();
pe.ID = ID.ToString();
pe.Name = Pen;
pe.Status = Status;
pe.Age = age;
PensionInfoList.Add(pe);
Thanks and regards
N.Ramachandran
...

Go to the complete details ...