![]() |
#2
猫爪必须在上2015-03-31 13:16
|
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录

begin
if (edit1.Text='') or (edit2.Text='')then
begin
application.MessageBox('登录信息不能为空!','提示信息',mb_ok);
edit1.SetFocus;
end
else
begin
with adoquery1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from user where username=:a and userpass=:b');//查找用户信息
showmessage(adoquery1.SQL.Text);
Parameters.ParamByName('a').Value:=trim(Edit1.Text);
Parameters.ParamByName('b').Value:=trim(Edit2.Text);
Open;
if RecordCount>0 then //判断是否存在
begin
loginfrm.Hide;
guanliyuanfrm.Show;
end
else
begin
application.MessageBox('密码或用户名有误!','提示信息',mb_ok);
edit1.Text:='';
edit1.SetFocus;
end
end
end;
end;
不知道错哪里了,百度上和书上的代码都一样的,到了做系统的时候就出错了,好急!!!求帮忙!!!