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

Execute statement in database on connect trigger [CORE2178] #2609

Closed
firebird-automations opened this issue Nov 9, 2008 · 5 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Dejan Schild (schild)

Duplicates CORE1693

Any use of EXECUTE STATEMENT in ON CONNECT database trigger raise error! Try this one, then check context variable 'WASERROR', it should be 0, but always is 333.

create or alter trigger CONNECT_GENERAL_SETUP
active on connect position 0
as
declare variable V_DBID bigint;
begin
RDB$SET_CONTEXT('USER_SESSION', 'WASERROR', 0);
execute statement 'SELECT 100 FROM RDB$DATABASE' into :V_DBID;
when any do
begin
RDB$SET_CONTEXT('USER_SESSION', 'WASERROR', 333);
end
end

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Duplicates CORE1693.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue duplicates CORE1693 [ CORE1693 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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

No branches or pull requests

1 participant