SqlCommand command = new SqlCommand("SELECT * FROM users WHERE Username = ? AND Password = ?", connection);
command.Parameters.AddWithValue("Username", username);
command.Parameters.AddWithValue("Password", password);
SqlDataReader reader = null;
reader = command.ExecuteReader();
When I run the program I get
Incorrect syntax near '?'.
On this line:
reader = command.ExecuteReader();
Can anyone see what I´m doing wrong?