Advantage TDataSet Descendant
Displays a message box for the last error (if there was one).
procedure AdsShowError( strCaption : String );
|
strCaption |
The title for the message box. Can be an empty string. |
AdsShowError will display a message box containing the last error message. The message displayed is identical to the error message available from AdsGetErrorString. This function is useful during development or debugging for viewing error messages immediately after the error occurred.
procedure TForm1.Button5Click(Sender: TObject);
begin
try
AdsTable2.open;
except
{$ifdef DEBUG}
AdsTable2.AdsShowError( 'table open' );
{$else}
{* put your release code error handling here *}
{$endif}
end;
end;