Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE should also be available as a PSQL context variable like GDSCODE/SQLCODE [CORE2890] #3274

Closed
firebird-automations opened this issue Feb 26, 2010 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Paulo França Lacerda (paulo_franca_lacerda)

Jira_subtask_outward CORE2935
Is related to QA323

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

Commits: 40be6d1 90b128d

====== 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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Paulo França Lacerda (paulo_franca_lacerda)

I think the correct issue title would be:
"SQLSTATE should also be available as Context Variable like GDSCODE."

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Component: Engine [ 10000 ]

summary: SQLSTATE not recognized within Stored Procedures - compile error. => SQLSTATE should also be available as a PSQL context variable like GDSCODE/SQLCODE

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5.1 [ 10333 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA323 [ QA323 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment