Okay, so i have managed to get a little further by finally finding some info that helps.
SqlCommand myCommand = new SqlCommand("select x_id, fullname, email, name, primarypin, secondarypin FROM cas_user_ext, cat_validation WHERE x_id = @key AND id = @key",
sqlcon.Connection);
myCommand.Parameters.AddWithValue("@key", "501");
So i have managed to retrieve the correct data from both tables. The problem i have now is how do i retrieve the key.id for lets say the name column (assuming i have the username of the user only)