Board index » delphi » DBIErrors

DBIErrors

Using Delphi 1 and BDE 2.52.

What is the correct sysntax for try

                                               except

linked to trap for DBIError-ALreadyLocked Error No 10247

Maurice D Stanton

 

Re:DBIErrors


Quote
Maurice D Stanton wrote:

> Using Delphi 1 and BDE 2.52.

> What is the correct sysntax for try

>                                                except

> linked to trap for DBIError-ALreadyLocked Error No 10247

Something like this could it be:

  try
    GenSet.Open;
  except
    On E:EDbEngineError do  {Prevent error message, if we can't open the GenSet.DB}
    begin
      if E.Errors[0].ErrorCode=11270 then {11270 = "Multiple NET files in use"}
      then ShowMessage('Error opening DB. Delete all PDOXUSRS.NET files');
      Application.Terminate;             {Close this app}
    end;
  end;

Other Threads