procedure TEnter.Enter_BtnClick(Sender: TObject);
var
Password:string;
begin
if XM_CB.Text='' then
begin
MessageBox(handle,'用户名不能为空,请选择或输入用户名!','错误',MB_OK or MB_ICONERROR);
exit;
end;
DL_ADOQ.Close;
DL_ADOQ.SQL.Clear;
DL_ADOQ.SQL.Add('Select Password,QXID From YH Where UserName=(:Name)');
DL_ADOQ.Parameters.ParamByName('Name').Value:=XM_CB.Text;
DL_ADOQ.Open;
if DL_ADOQ.FieldByName('Password').IsNull then Password:=''
else Password:=DL_ADOQ.FieldValues['Password'];
if Password=MM_E.Text then
begin
YH:=XM_CB.Text;
QX:=DL_ADOQ.FieldValues['QXID'];
self.Hide;
DL_ADOQ.Close;
FreeAndNil(DL_ADOQ);
with TMain.Create(nil) do
try
ShowModal;
finally
Free;
Application.Terminate;
end;
end
else begin
MessageBox(0,'密码错误请重新输入!','密码错误',MB_OK or MB_ICONERROR);
MM_E.Text:='';
end;
end;提示:[错误] Enter_Form.pas(64): Undeclared identifier: 'YH'
[错误] Enter_Form.pas(65): Undeclared identifier: 'QX'
[致命错误] TKSCXT.dpr(7): Could not compile used unit 'Enter_Form.pas'
怎么实现登陆窗口
var
Password:string;
begin
if XM_CB.Text='' then
begin
MessageBox(handle,'用户名不能为空,请选择或输入用户名!','错误',MB_OK or MB_ICONERROR);
exit;
end;
DL_ADOQ.Close;
DL_ADOQ.SQL.Clear;
DL_ADOQ.SQL.Add('Select Password,QXID From YH Where UserName=(:Name)');
DL_ADOQ.Parameters.ParamByName('Name').Value:=XM_CB.Text;
DL_ADOQ.Open;
if DL_ADOQ.FieldByName('Password').IsNull then Password:=''
else Password:=DL_ADOQ.FieldValues['Password'];
if Password=MM_E.Text then
begin
YH:=XM_CB.Text;
QX:=DL_ADOQ.FieldValues['QXID'];
self.Hide;
DL_ADOQ.Close;
FreeAndNil(DL_ADOQ);
with TMain.Create(nil) do
try
ShowModal;
finally
Free;
Application.Terminate;
end;
end
else begin
MessageBox(0,'密码错误请重新输入!','密码错误',MB_OK or MB_ICONERROR);
MM_E.Text:='';
end;
end;提示:[错误] Enter_Form.pas(64): Undeclared identifier: 'YH'
[错误] Enter_Form.pas(65): Undeclared identifier: 'QX'
[致命错误] TKSCXT.dpr(7): Could not compile used unit 'Enter_Form.pas'
怎么实现登陆窗口
解决方案 »
- 再次请教ADO如何连接dbf的问题?前提是不用ODBC
- delphi 时间怎么比较啊
- Delphi 2005 Reviewers Guide+最新信息
- 求助---模拟windows包含文字查找功能
- 关于日期的运算和ADOQUERY
- q1.sql.text:='select aaa ...... from where code=:code and nas:=nas';太长如何分开
- 这辈子注定要完了吗?
- ?怎样用字符串(如000111001)为系统分配权限?请看这部分不完全正确的代码,请更正
- DELPHI会自动在菜单中加入一个快捷键,如果我不想加这个快捷键应该怎么做啊?
- 如何在TABLE上实现order by 这样的排序功能??
- DELPHI 数据库应用程序的问题
- 监控IE下载
YH:=XM_CB.Text;
QX:=DL_ADOQ.FieldValues['QXID'];
你这两句就是把YH,QX当变量用了