Issue Details (XML | Word | Printable)

Key: CORE-2890
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Paulo França Lacerda
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

SQLSTATE should also be available as a PSQL context variable like GDSCODE/SQLCODE

Created: 26/Feb/10 05:25 AM   Updated: 29/May/15 04:17 PM
Component/s: Engine
Affects Version/s: 2.5 RC2
Fix Version/s: 2.5.1, 3.0 Alpha 1

Environment:
Windows 2003 Server.
AMD Athlon 32-bit, 1.66 GHz, 1 GB RAM
Issue Links:
Relate
 

QA Status: Done with caveats
Test Details:
1) Despite of ticket's issue that it was fixed to 2.5.1, test script from here will output
     NOT ALL rows in WI-V2.5.1.26351 (official 2.5.1 release) -- see details in .fbt.
     For this reason it was decided to specify min_version = 2.5.2 rather than 2.5.1
2) the same .fbk file is used for 2.5 and 3.0 in order to remove common init_script

Sub-Tasks  All   Open   

 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Paulo França Lacerda added a comment - 14/Mar/10 10:03 PM
I think the correct issue title would be:
"SQLSTATE should also be available as Context Variable like GDSCODE."