Subject How to SQLSTATE within a stored procedure?
Author athrasoft2000
I'm getting a compile error when trying to access the new SQLSTATE code as I usually do to SQLCODE and GDSCODE.

My test code:
---------------------
create procedure sp_Test_SqlState (
SomeParam Integer)
returns (
oSqlErr Integer,
oGdsErr Integer,
oSqlStt Char(5)) as
begin
/* do something... */

when Any do
begin
oSqlErr = SqlCode;
oGdsErr = GdsCode;
oSqlStt = SqlState; /* ERROR: "SQLSTATE" UNKNOWN! */

suspend;
end
end


I'm using:
---------------------
Firedbird 2.5 RC2 on Windows 2003
EMS SQL Manager 2008
Flamerobin 0.9.3.1870

Am I using it mistankenly or perhaps those tools above aren't yet prepared for Firebird 2.5?

Thanks in advance,
Paulo Fran├ža