Page 1 of 1

EDAError restoring

Posted: Sat 18 Sep 2010 16:11
by yota

Code: Select all

try
   DM.IBCRestoreService1.ServiceStart;
   while DM.IBCRestoreService1.IsServiceRunning do begin
      Application.ProcessMessages;
   end;
except
    on E: EDAError do begin
     // catch me 
    end;
end;
I've got the same error codes when the backup file doesn't exist and the same when database is in use. How can I know which exception is raised?

Posted: Mon 20 Sep 2010 09:56
by AndreyZ
Hello,

These errors are created by the InterBase server and InterBase Service's API, and IBDAC doesn't change them.

GDSCODE or SYMBOL?

Posted: Mon 20 Sep 2010 14:48
by yota
Thanks, I understand. What about GDSCODE or SYMBOL of an error code? Can I somehow retrieve them from EDAError?

Posted: Wed 22 Sep 2010 11:21
by Dimon
You can use the following properties of the EIBCError class:
SQLErrorMsg - holds the error message describing the part of the SQL code that caused the error.
ErrorNumber - determines the error number returned by InterBase.
ErrorCode - determines the error code returned by InterBase.