Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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
-
D--M22667y
-
no it's fine :) infact, you helped lots! ive managed to fix it up abit. @soohoonigan
Related Rants
I need help.
im making a program and
im using an access database
and i want to make it so that the user's input is to be searched from two different tables in one Access file.
thank you for reading and sorry if my english is abit shaky
question
visualbasic
ms access