hi can anyone please help me with this fetching from database of int values im having difficulty in fetching int values , it works for varchar but not int can someone help me ou
Call ToString() instead of casting the reader result.
ToString()
reader[0].ToString(); reader[1].ToString(); // etc...
And if you want to fetch specific data type values (int in your case) try the following:
int
reader.GetInt32(index);