在ADOCommand中使用‘UpDate’修改记录?
Edman 2005-03-04 11:26:31 在ADOCommand中使用‘UpDate’修改记录,带参数时提示错误,出错代码如下:
with ADOComKL do
begin
CommandText:='Update YHB set 用户口令= :NKL where 用户名= :Username';
Parameters.Clear;
Parameters.ParamValues['NKL']:=Trim(Edit2.Text);
Parameters.ParamValues['Username']:=LogUn.userID;
Prepared:=True;
Execute;
end;
编译时弹出对话框提示如下:
Debugger Exception Notification
Project GZRB.exe raised exception class EDatabaseError with Message
'ADOComKL:Parameter 'NKL'not Found'.Process stopped.Use Step or Run to Continue.
望告知如何解决,谢谢。