Hi I new here I have a couple of questions.
I am trying to authenticate login and password and Im getting a few errors.
1. first is the db error in my dbqueries class file. I am using sqlce for testing purposes.
public DataSet Login(string Username, string Password)
{
SqlCeConnection con = new SqlCeConnection("DataSource = CloakWare.sdf;");
con.Open();
SqlCeCommand cmd = new SqlCeCommand("Select * From Users where Username = @Username and Password = @Password");
cmd.Connection = con;
SqlCeDataAdapter da = new SqlCeDataAdapter("Select * From Users where Username = @Username and Password = @Password", con);
cmd.Parameters.Add("@Username", SqlDbType.NVarChar, 100, "Username").Value = Username;
cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 100, "Password").Value = Password;
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
return ds;
}
this is the error it gives me : A parameter is missing. [ Parameter ordinal = 2 ]
I assume ordinal means position?