W
wangxinf3
Unregistered / Unconfirmed
GUEST, unregistred user!
[]大家看看下面的:我的用户名有三个,system为超级用户,在第三位,我在system的ability字段有123,其他的为空,
可是下面的总是在第一个,也就是说当我以system登陆时Flatcheckbox1.checked:=true无效,怎么做呢?
procedure TForm3.FlatRadioButton2Click(Sender: TObject);
begin
with form1.adoquery1 do
begin
close;
sql.clear;
sql.add('select ability from 用户 where user=('''+form1.flatedit1.text+''')');
open;
if form1.ADOTable1.FieldByName('ability').AsString='123' then
begin
form3.Flatcheckbox1.checked:=true;
form3.Flatcheckbox2.checked:=true;
form3.Flatcheckbox3.checked:=true;
end;
end; end;
可是下面的总是在第一个,也就是说当我以system登陆时Flatcheckbox1.checked:=true无效,怎么做呢?
procedure TForm3.FlatRadioButton2Click(Sender: TObject);
begin
with form1.adoquery1 do
begin
close;
sql.clear;
sql.add('select ability from 用户 where user=('''+form1.flatedit1.text+''')');
open;
if form1.ADOTable1.FieldByName('ability').AsString='123' then
begin
form3.Flatcheckbox1.checked:=true;
form3.Flatcheckbox2.checked:=true;
form3.Flatcheckbox3.checked:=true;
end;
end; end;