Page 1 of 1

Error Codes

Posted: Fri 06 Nov 2009 12:50
How do I get the Database Error code associated with the raised Exception?

Re: Error Codes

Posted: Mon 09 Nov 2009 00:43
by wjzws
[email protected] wrote:How do I get the Database Error code associated with the raised Exception?
try
uniquery1.Execute;
except
on e: Exception do
begin
showmessage(EDAError(e).Message);
showmessage(inttostr(EDAError(e).ErrorCode)); //return Server error num
end;

end;

Posted: Mon 09 Nov 2009 07:58
by Plash
Use the ErrorCode property of EUniError or its base class EDAError.

Posted: Tue 10 Nov 2009 04:30
Thank You.