Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
spacem19193yPeople still use access?
First, use an OleDbParameter so people can't inject sql...and unless you really intend to set the label text multiple times you don't need to read the first datareader in a while loop. Also, since you're selecting by id_no, the "txtidno.Text = dr.("id_no").ToString" check is unnecessary. But, to the problem at hand...I can't see the rest of your code and don't know your table structure, but it seems like you should just be joining the two tables by id_no or using a union with distinct since it looks like all you're looking for is the student's personal info. If you really need to iterate two datareaders at the same time, you might need to use two separate connection objects. I haven't used Access in a while, but I know with Oracle that will throw an exeception, and same for MySql unless you enable MultipleActiveResultSets. Sorry if that came off like a stackoverflow post lol
Please use stackoverflow or ask in devrant discord server.