错误信息:List index out of bounds(0)
本人在其他窗体中也这样写没问题,为什么到login窗体就出错了,想不明白,请高手指点.procedure Tlogin_form.ok_Button_codeClick(Sender: TObject);
begin
With Query_lgoin do
begin
Close;
SQL.Clear;
SQL.Add('select * from C_admin' );
SQL.Add('where c_user=:c');
Parameters[0].Value:=user_edit.Text;
ExecSQL;
Open;
if not(RecordCount>0)then showmessage('用户名不存在');
else
ModalResult:=mrOk;
end;
end;
本人在其他窗体中也这样写没问题,为什么到login窗体就出错了,想不明白,请高手指点.procedure Tlogin_form.ok_Button_codeClick(Sender: TObject);
begin
With Query_lgoin do
begin
Close;
SQL.Clear;
SQL.Add('select * from C_admin' );
SQL.Add('where c_user=:c');
Parameters[0].Value:=user_edit.Text;
ExecSQL;
Open;
if not(RecordCount>0)then showmessage('用户名不存在');
else
ModalResult:=mrOk;
end;
end;
解决方案 »
- clientdateset 的 ApplyUpdates的问题
- 报表查询,提示数据库连接超时?
- 请教:通过子窗口中的变量改变主窗口状态条的text值后,为什么看不到变化?
- Drate(小虫)请来接1000分__8) 原贴:http://expert.csdn.net/Expert/topic/2227/2227167.xml?temp=.3559534
- 一个用dbgrid显示的问题?
- 继续为我的软件征求意见,特别欢迎有软件发布经验的朋友。
- 字符串问题
- 如何实现treeview条目的多选?
- 怎样读取任意一个文件的ascii码呢|?
- delphi https 问题,急
- 求delphi语句
- 为何我的Abort不起作用?
Open; ?? 查询用open就行了 要exesql干啥
好就算不用ExecSQL; 用open;
一样会出相同的错误
把ADOConnection放到DM_form上uses过来,运行以上代码就出错??
验证正确才能往下走,所以.....谢谢了~~