I am quite new to vb.net so you will have to bear with me.
I have these 2 tables in the same database in an SQL Server.
I want to loop through one table and for each record check to see if i can find a record that matches the current one's phone number in the other table.
My newbness shows clearly here. I open a dataReader to the first table and am looping through each of the records. As I am looping through I created an sqlCommand to create a second dataReader object and was going to use the .HasRows method of dataReader to see if anything was returned.
Of course, I didnt know that you could not have 2 dataReaders using the same Connection object. So now I am stuck.
Does anyone have any ideas of a better way to do this. Any help would be much appreciated.
Thanks.
I have these 2 tables in the same database in an SQL Server.
I want to loop through one table and for each record check to see if i can find a record that matches the current one's phone number in the other table.
My newbness shows clearly here. I open a dataReader to the first table and am looping through each of the records. As I am looping through I created an sqlCommand to create a second dataReader object and was going to use the .HasRows method of dataReader to see if anything was returned.
Of course, I didnt know that you could not have 2 dataReaders using the same Connection object. So now I am stuck.
Does anyone have any ideas of a better way to do this. Any help would be much appreciated.
Thanks.