Error Codes

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
[email protected]
Posts: 17
Joined: Sat 02 May 2009 11:20

Error Codes

Post by [email protected] » Fri 06 Nov 2009 12:50

How do I get the Database Error code associated with the raised Exception?

wjzws
Posts: 20
Joined: Fri 17 Jul 2009 02:33

Re: Error Codes

Post by wjzws » Mon 09 Nov 2009 00:43

[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;

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 09 Nov 2009 07:58

Use the ErrorCode property of EUniError or its base class EDAError.

[email protected]
Posts: 17
Joined: Sat 02 May 2009 11:20

Post by [email protected] » Tue 10 Nov 2009 04:30

Thank You.

Post Reply