Hi,
I'm currently working on a log in page for a windows app.
All i want to do at this stage is check the entered username and
password against the values held in the database.
currently I have
SqlDataReader read = null;
string query = "SELECT * FROM [User] WHERE username = " + enteredUser;
SqlCommand myCommand = new SqlCommand(query, conn);
read = myCommand.ExecuteReader();
//and just to check the values
if((string)read["pass"]==txtPass.Text)
{
MessageBox.Show("worked");
}
does this look like it should be working? Its not bringing back any
values when i enter details i know exist in the database.
thanks