TAdsQuery.AdsClearSQLAbortFunc

Advantage TDataSet Descendant

Clears the SQL abort callback function registered using AdsRegisterSQLAbortFunc.

Note This API still functions as before, but is now obsolete. It is suggested that you use AdsRegisterCallbackFunction and AdsClearCallbackFunction instead, as they work better with threads and have more complete functionality.

Syntax

procedure AdsClearSQLAbortFunc;

Description

AdsClearSQLAbortFunc will make the Advantage Client Engine stop calling the registered callback function. AdsRegisterSQLAbortFunc is used to abort an SQL query.

Example

function MySQLAbortFunc : Longint ; stdcall;

begin

if ( gbCancelRequested ) then

Result := 1

else

Result := 0;

end;

 

procedure TForm1.RegisterButtonClick(Sender: TObject);

begin

AdsQuery1.AdsRegisterSQLAbortFunc( @MySQLAbortFunc );

end;

 

procedure TForm1.ClearButtonClick(Sender: TObject);

begin

AdsQuery1.AdsClearSQLAbortFunc;

end;

See Also

AdsRegisterSQLAbortFunc