我没调试成功,提示我 我仿照2楼的这样做的: procedure TForm1.DBGrid1DblClick(Sender: TObject); begin ADOQuery1.Parameters.ParamByName('单位编号').Value:=ADOTable1.fieldbyname('单位编号').AsVariant; ADOQuery1.Open; Edit1.Text := ADOQuery1.fieldbyname('单位编号').AsString; end;--------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EDatabaseError with message 'ADOQuery1: Parameter '单位编号' not found'. Process stopped. Use Step or Run to continue. --------------------------- OK Help --------------------------- 是不是我adoquery还要设置什么?sql语句我不知道写些什么好
begin
ADOQuery1.Parameters.ParamByName('Pname').Value :=
ADOTable1.fieldbyname('FieldName').AsVariant;
ADOQuery1.Open;
Edit1.Text := ADOQuery1.fieldbyname('FieldName1').AsString;
end;
我仿照2楼的这样做的:
procedure TForm1.DBGrid1DblClick(Sender: TObject);
begin ADOQuery1.Parameters.ParamByName('单位编号').Value:=ADOTable1.fieldbyname('单位编号').AsVariant;
ADOQuery1.Open;
Edit1.Text := ADOQuery1.fieldbyname('单位编号').AsString;
end;---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EDatabaseError with message 'ADOQuery1: Parameter '单位编号' not found'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
是不是我adoquery还要设置什么?sql语句我不知道写些什么好
procedure TForm1.ADOQuery1AfterScroll(DataSet: TDataSet);
begin
edit1.Text := ADOQuery1.fieldbyname('fname').AsString;
edit2.Text := ADOQuery1.fieldbyname('fage').AsString;
end;
[email protected]