Subject execute statement
Author Fernando Salaices
Hi, new to firebird here.

I'm dabling with EXECUTE STATEMENT and I want to grant privileges with
it byt I'm having problems with it. I found this code some were and it
seems perfectly logical, and ir executes with no errors, but it just
does not assign the privileges I want:

ALTER PROCEDURE "SP_GRANT_ALL" ( "M_USER" CHAR(31) )
AS
DECLARE VARIABLE M_TABLE CHAR(31);
begin
for select RDB$RELATION_NAME as myTable
from rdb$relations
WHERE SUBSTRING(RDB$RELATION_NAME from 1 for 4) <> 'RDB$'
INTO :m_table
do
begin
execute statement 'grant all on ' || :m_table || ' to ' || :m_user; end
suspend;
end
^


is it possible to use GRANT PRIVILEGES with EXECUTE STATEMENT?

--

Saludos,
Fernando Salaices.