Allow connect to external databases, separate from execute statement
--------------------------------------------------------------------

                 Key: CORE-4195
                 URL: http://tracker.firebirdsql.org/browse/CORE-4195
             Project: Firebird Core
          Issue Type: New Feature
            Reporter: Simonov Denis
            Priority: Minor


The idea is to declare a connection to an external database in PSQL block and 
use it to execute statement.

execute block as
  declare stt varchar(255) = 'select count(*) from rdb$relations';
  declare cnt int;
  declare i int = 10;
  declare external source my_ext_source  'localhost:D:\TEST25.fdb' as user 
'sysdba' password 'masterke';
begin
  open my_ext_source;
  while (i > 0) do
  begin
     execute statement (:stt)
       with autonomous transaction
       on external my_ext_source
       into :cnt;
     i = :i - 1;
  end
  close my_ext_source;
end

This will connect to the database only once, instead of connections and 
disconnections for each execution execute statement.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to