Subject Re: Accessing tables across databases
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, "joseigd" wrote:
> In one FB database, I need to access a handful of tables from
> another one. Can an SP do this? I mean, an SP in DB #1 that connects
> to DB #2, gain access to the tables it needs and then closes the
> connection.
>
> TIA for your comments
>
> José

A query or a stored procedure cannot access data outside its database
(well, as others have told you, it may be theoretically possible
through a UDF). However, a transaction can span several connections
(databases). Hence, I would expect IBO (possibly others as well, I
just don't know them) to be able to have one parent query accessing
one database with a child query requesting records from another.
Though I must admit, I think I haven't tried such a scenario yet so it
may behave differently than I expect and this may not even be an
answer to what you're asking (it moves the problem away from the
server and to the client)...

Set