with dmf.Q_temp do
begin
close;
sql.Clear;
sql.Add('select * from rsk');
sql.Add('where name='+''''+ComboBox1.text+'''');
open;
end;
if dmf.Q_temp.Fieldbyname('pwd').asstring= edit1.text then
begin
close;
end else
begin
application.MessageBox('口令无效,请重新输入','系统信息',MB_OK+MB_Iconquestion);
edit1.SetFocus;
end;我用以上的代码做系统的登入界面,数据库用access的时候不管密码的值是不是空的,都能进入到主界面,但是改用了sql server2000的时候。密码为空是能进入,不为空是就老是说“口令无效。”可是我明明输入的是正确的密码啊??
begin
close;
sql.Clear;
sql.Add('select * from rsk');
sql.Add('where name='+''''+ComboBox1.text+'''');
open;
end;
if dmf.Q_temp.Fieldbyname('pwd').asstring= edit1.text then
begin
close;
end else
begin
application.MessageBox('口令无效,请重新输入','系统信息',MB_OK+MB_Iconquestion);
edit1.SetFocus;
end;我用以上的代码做系统的登入界面,数据库用access的时候不管密码的值是不是空的,都能进入到主界面,但是改用了sql server2000的时候。密码为空是能进入,不为空是就老是说“口令无效。”可是我明明输入的是正确的密码啊??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货