SqlCommand comm = new SqlCommand("SELECT * FROM UsrTbl, RelativeTable, IP_Table WHERE RelativeTable.UserID IN (SELECT UserID FROM UsrTbl WHERE UserName = @usrnmeLbl)", conn);
comm.Parameters.AddWithValue("@usrnmeLbl", usrNmeLbl.Text);

SqlDataReader reader = comm.ExecuteReader();
//Check to see if the reader has data(Did the username exist in the database? We must check this
if (reader.Read() != false)



I see that comm is a SqlCommand object with the sql command parameters passed to it. Then I believe reader is a data reader object that is being told to reference something about the comm object. But what is it? Is it a property(ExecuteReader())?

Or is it some kind of object creation method that then creates a new reader object that can act like an indexer.



If someone could point out my misconceptions I would really appreciate it.

Thanks in advance.