in reply to Re: CDBI and multiple databases
in thread CDBI and multiple databases

Class::DBI may not be able to do this (and maybe MySQL can't handle it) - but with Sybase I can have a single transaction span multiple databases on a single connection. You simply have to fully qualify the name of the tables with the database:
begin tran update db1.dbo.foo set bar = 1 where baz=2 delete db2.dbo.bar where baz=2 commit tran
(where "dbo" above is the table owner - in this case the "database owner").

Michael

Replies are listed 'Best First'.
Re: Re: Re: CDBI and multiple databases
by Anonymous Monk on Mar 21, 2004 at 16:53 UTC

    MySQL can handle multiple database transactions in a single connection as well.

    The problem is that Class::DBI is forcing multiple connections, thus preventing the transaction from working properly.