Vlad Khorsun wrote:
> 05.02.2015 14:36, Geoff Worboys wrote:
>> Hi,
>>
>> Firebird v2.5.3
>>
>> I've been studying the source trying to understand the reasons
>> behind a particular aspect of EXECUTE STATEMENT with ON EXTERNAL.
>>
>> Specifically, why are USER PASSWORD and ROLE tied together here?

>    Why do you think so ? See below:

Note that I said with ON EXTERNAL.

execute block returns (qry varchar(32), tx int, rl varchar(32))
as
declare s varchar(256);
begin
   s = 'select current_transaction, current_role from rdb$database';

   qry = 'local';
   tx = current_transaction; rl = current_role;
   suspend;

   -- this works
   qry = 'EX1';
   execute statement :s
   on external 'Some Database'
     into :tx, :rl;
   suspend;

   -- this gives username/password not defined
   qry = 'EX2';
   execute statement :s
   on external 'Some Database'
   role 'SOME_ROLE'
     into :tx, :rl;
   suspend;
end

-- 
Geoff Worboys
Telesis Computing Pty Ltd


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to