P
Patrick Jox
Hello,
can anybody explain me, why I find anywhere in the documentation this
example
Sql = "SELECT tblPerson.Person_GUID FROM tblPerson " +
"WHERE tblPerson.Username = @User AND tblPerson.Password = @Pwd";
cmd = new OleDbCommand(Sql, m_conn);
cmd.Parameters.Add("@User", Username);
cmd.Parameters.Add("@Pwd", Password);
try
{
return (int)cmd.ExecuteScalar();
}
catch
{
return -1;
}
Executing this code snippet I get an error message saying that the variable
@user is not declared. When I modify the select statement as follows
everything works fine!
Sql = "SELECT tblPerson.Person_GUID FROM tblPerson " +
"WHERE tblPerson.Username = ? AND tblPerson.Password = ?";
WHY?????
thanks - Patrick
can anybody explain me, why I find anywhere in the documentation this
example
Sql = "SELECT tblPerson.Person_GUID FROM tblPerson " +
"WHERE tblPerson.Username = @User AND tblPerson.Password = @Pwd";
cmd = new OleDbCommand(Sql, m_conn);
cmd.Parameters.Add("@User", Username);
cmd.Parameters.Add("@Pwd", Password);
try
{
return (int)cmd.ExecuteScalar();
}
catch
{
return -1;
}
Executing this code snippet I get an error message saying that the variable
@user is not declared. When I modify the select statement as follows
everything works fine!
Sql = "SELECT tblPerson.Person_GUID FROM tblPerson " +
"WHERE tblPerson.Username = ? AND tblPerson.Password = ?";
WHY?????
thanks - Patrick