I assume there's an amusing reason why you didn't tell us what line gives the error, assure us that you've read the ( plain English ) message, and explained why, using your debugger, you feel sure the message is in error, the compiler is wrong, and you're using indices that are valid ?
rigtsale wrote:
Dim strConn As String = ("Provider = SQLOLEDB;Data Source = INDABS\RMS;Initial Catalog = INDB;User ID = sa;Password = s@1234;Persist Security Info = TRUE;")
There's at least three reasons I'd fire someone who wrote this code. I assume you're just learning, but learn more about DB security and writing enterprise level apps, please.
rigtsale wrote:
grvDesignationList.Item(0, i).Value = OReader("DesID")
grvDesignationList.Item(1, i).Value = OReader("DesName")
grvDesignationList.Item(2, i).Value = OReader("DesShortName")
grvDesignationList.Item(3, i).Value = OReader("DesDescription")
grvDesignationList.Item(4, i).Value = OReader("DesIsDefault")
I take it this is your problem. Why are you not just using databinding ?