Home > Back-end >  How can I click trigger ADOQuery1AfterScroll this event?
How can I click trigger ADOQuery1AfterScroll this event?

Time:12-11

Under the events of the ADOQuery1 code
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 single
ADOQuery2. 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
  • Related