Subject Re: [firebird-support] EXECUTE STATEMENT ON EXTERNAL 'ODBC://odbc_datasource_name'
Author Mark Rotteveel
Questions on Firebird 3.0 - as long as it isn't final - should be
directed to the firebird-devel mailinglist.

Note that the document you link to is about the provider architecture,
there is no ODBC provider included in Firebird 3.0, so this doesn't work
out of the box.

Mark

On 30-8-2014 12:25, bert_herngreen@... [firebird-support] wrote:
> Should the Execute statement work on an ODBC datasource already with FB 3.0?
>
> EXECUTE BLOCK AS
> BEGIN
> EXECUTE STATEMENT 'SELECT * FROM TEST_TABLE'
> ON EXTERNAL 'ODBC://TEST';
> END
>
> I receive the following error message:
> Execute statement error at attach :335544721 : Unable to complete
> network request to host "ODBC".
> 335544704 : Failed to locate host machine.
> 335544706 : The specified name was not found in the hosts file or Domain
> Name Services.
> Data source : Firebird::ODBC://TEST.
>
> It seems prefix ODBC is not recognized and interpreted as hostname.
>
> I read about this feature in the presentation 'Firebird 3: provider -
> based architecture, plugins and OO approach to API' from Alex Peshkov
> (http://www.firebirdsql.org/file/community/ppts/fbcon11/Firebird3Plug
> ins2011.pdf
> <http://www.firebirdsql.org/file/community/ppts/fbcon11/Firebird3Plugins2011.pdf>).
>
> In the release notes
> (http://web.firebirdsql.org/download/prerelease/rlsnotes/Firebird-3.0.0_Alpha1-ReleaseNotes.pdf)
> I read:
>
> The ability to access foreign database engines using providers should
> not be overlooked, either. It might seem
> strange to consider this, given the number of tools available for this
> sort of task. Think about the ability to
> access other Firebird databases using EXECUTE STATEMENT, that became
> available in Firebird 2.5. With
> a provider to ODBC or other common tool to access various data sources
> it is within reach to use EXECUTE
> STATEMENT to get direct access from procedures and triggers, to data
> from any database having a driver for
> the chosen access tool. It is even possible to have a provider to access
> some particular typ e of foreign database engine if there is some reason
> to want to avoid the ODBC layer.
>
> Or did I misinterpret 'is within reach'?

--
Mark Rotteveel