EDAError not always showing correct error code
Posted: Wed 24 Feb 2010 21:57
I am using Delphi 7, UniDAC 2.7.0.8, PostgreSQL 8.3.7
EDAError(E).ErrorCode not reporting the error code.
For example:
var
aQuery: TUniQuery;
begin
aQuery:= TUniQuery.Create( nil );
aQuery.sql.add( 'select log(-1)' );
try
aQuery.Execute;
except
on E: EDAError do
ShowMessage( IntToStr( E.ErrorCode ) + ' ' + E.Message );
end;
end;
E.ErrorCode = 0, it should be 2201E according to the PostgreSQL Error Code table
http://www.postgresql.org/docs/8.3/inte ... endix.html
E.ErrorMessage = cannot take logarithm of a negative number
Thank you
Alan
EDAError(E).ErrorCode not reporting the error code.
For example:
var
aQuery: TUniQuery;
begin
aQuery:= TUniQuery.Create( nil );
aQuery.sql.add( 'select log(-1)' );
try
aQuery.Execute;
except
on E: EDAError do
ShowMessage( IntToStr( E.ErrorCode ) + ' ' + E.Message );
end;
end;
E.ErrorCode = 0, it should be 2201E according to the PostgreSQL Error Code table
http://www.postgresql.org/docs/8.3/inte ... endix.html
E.ErrorMessage = cannot take logarithm of a negative number
Thank you
Alan