ExecuteScalar() did not work however I did try this and I got an exception:
try
{
comm.CommandText = "SELECT count(*) FROM Accounts WHERE username = '" + txtUsername.Text + "', " + pboxPasscode.Password + "';";
int count = comm.ExecuteNonQuery();
if (count > 0)
{
this.Frame.Navigate(typeof(HomeStudent));
}
}
catch
{
}
No comments:
Post a Comment