seems reader[0] and reader[1] both or anyone has some invalid data so Convert.ToInt32 method not able to convert to int please check column value in table. Trim if there is any whitespace / null / empty string also verify data insertion is code is proper or not.
While using Convert.ToInt32 you didn't provided the proper value which will convert it to int. So in those two places check properly what value you are passing and whether that value can be convert to int or not. Thanks
Guest UserPosted Jul 2, 2021, 1:15 PM
registers.Serial= Convert.ToInt32(reader[0]);
registers.RegNo= Convert.ToInt32(reader[1]);
Not working
Guest UserPosted Jul 2, 2021, 1:11 PM
Sachin SinghPosted Jul 2, 2021, 7:29 AM
Rajanikant HawaldarPosted Jul 2, 2021, 6:31 AM
Salman BegPosted Jul 2, 2021, 3:50 AM