Instead of this:
s5 = dr[6].ToString();
Try this:
s5 = dr.GetInt32(6);
You also need to change the type of
s5
from
string
to
int
.
If the value in the database is not an int, but a double, use
GetDouble
, and if the value is a decimal, use
GetDecimal
.