+ -
当前位置:首页 → 问答吧 → 为会么以下代码不能实现登录界面!

为会么以下代码不能实现登录界面!

时间:2011-10-18

来源:互联网

procedure TForm1.FormCreate(Sender: TObject);
begin
with adotable1 do
begin
Open;
while not eof do
begin
combobox1.Items.Add(fieldbyname('name').asstring);
next;
end;
combobox1.Text:=combobox1.Items[0];
close;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;

procedure TForm1.Button1Click(Sender: TObject);
var strpassword:string;
begin
adotable1.DisableControls;
adotable1.Locate('name',combobox1.Text,[lopartialkey]);
strpassword:=adotable1['password'];
adotable1.EnableControls;
if edit1.Text=strpassword then showmessage('成功登录');
end;

作者: iamqdxy   发布时间: 2011-10-18

是程序报错了!还是不能成功的执行showmessage啊!

作者: jayqiang   发布时间: 2011-10-18

strpassword前后有空格?

作者: s11ss   发布时间: 2011-10-18

热门下载

更多