我想做一个登陆用户界面,用ADOQuery与数据库相连,
with adoquery1 do
adoquery1.close;
adoquery1.SQL.Clear ;
adoquery1.sql.add('select * from password;');
adoquery1.open;
这样是好用的.可是在SQL语句中加入where后就问是弹出错误.请问如何解决.
adoquery1.sql.add('select * from password where username=:temp1 and password=:temp2;');
adoquery1.Parameters.ParamByName(temp1).value:=user.Text;
adoquery1.Parameters.ParamByName(temp2).value:=psw.Text;
这样子写有什么错吗?