Procedure TMain. ADOQuery1AfterScroll (DataSet: TDataSet);
The begin
ADOQuery2. Sql. The Clear;
ADOQuery2. Sql. The Add (' Select * From XueSheng Where XueHao=: XueHao ');
ADOQuery2. The Parameters. ParamByName (' XueHao). Value:=Edit1. Text;
ADOQuery2. Open;
end;
I want to achieve, after click the button to trigger the ADOQuery1AfterScroll this event,
CodePudding user response:
Write a process that a singleADOQuery2. Sql. The Clear;
ADOQuery2. Sql. The Add (' Select * From XueSheng Where XueHao=: XueHao ');
ADOQuery2. The Parameters. ParamByName (' XueHao). Value:=Edit1. Text;
ADOQuery2. Open;
For example a process called XXXXXX
So, you call in ADOQuery1AfterScroll XXXXXX
In the button event also perform XXXXXXX