ado + access +midas 执行查询时出错,请大家帮帮。(200分)

  • 主题发起人 nmfx1122
  • 开始时间
N

nmfx1122

Unregistered / Unconfirmed
GUEST, unregistred user!
我的源码是执行一个客户端密码验证的过程。

procedure Tfx_Login.cb_LoginClick(Sender: TObject);
begin
clientdataset1.Close;
clientdataset1.CommandText:='select fcpassowrd,fcuser_name form fx_user where fcUser_name='''+cb_name.Text+'''';
clientdataset1.open;
if clientdataset1.Params.ParamByName('fcpassword').AsString <> edt_password.Text then
begin
application.MessageBox('操作员密码有误!','系统信息',mb_OK+MB_iconerror);
exit;
edt_password.SetFocus;
end
else
application.MessageBox('欢迎登录本系统!','提示',MB_OK);
fx_main.ShowModal;

ModalResult:=idOK;
end;
以上代码 fcuser_name , fcpassword 是access 库中 fx_user表中的一个字段 cb_name是一个Tcombobox;
请各们帮帮,我已用了两天的时间还在这处问题上了,请大家帮帮。
错误提示
project fxxs.exe raised exception class Eoleexception with message '语法错误(操作符丢失)在查询表达式'fcuser_name form fc_user where fcuser_name='demo''中',process stopped.use step or run to continue.
 
form 应该是from:)
 
不好意思,改过后提示。
Project fxxs.exe raised exception class eoleException with message '参数 fcpassword 没有默认值.' process stopped.use step or run to continue
 
问题自己解决了,多谢ydfq
你让我更多的学了经仔细.
所以200都加你了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
744
import
I
I
回复
0
查看
843
import
I
S
回复
0
查看
846
SUNSTONE的Delphi笔记
S
顶部