On Feb 5, 2008 11:05 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 06, 2008 at 12:57:08AM +0300, Oleg Broytmann wrote:
> > class MyTable(SQLObject):
> >_connection = connection
> >
> > class MyTable2(SQLObject):
> >_connection = connection2
>
> BTW, both _connection and the
On Feb 5, 2008 11:14 PM, Petr Jakeš <[EMAIL PROTECTED]> wrote:
> On Feb 5, 2008 11:05 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
>
> > On Wed, Feb 06, 2008 at 12:57:08AM +0300, Oleg Broytmann wrote:
> > > class MyTable(SQLObject):
> > >_connection = connection
> > >
> > > class MyTable2(SQL
On Wed, Feb 06, 2008 at 12:57:08AM +0300, Oleg Broytmann wrote:
> class MyTable(SQLObject):
>_connection = connection
>
> class MyTable2(SQLObject):
>_connection = connection2
BTW, both _connection and the parameter to .setConnection() can be a DB
URI string - SQLObject calls connectio
On Tue, Feb 05, 2008 at 10:52:52PM +0100, Petr Jake?? wrote:
> My tables are two different tables in two different databases.
Then your way is even simpler:
class MyTable(SQLObject):
_connection = connection
class MyTable2(SQLObject):
_connection = connection2
Oleg.
--
Oleg Broyt
>
> Yes. And you don't need to redecalre tables - if MyTable and MyTable2
> are realy the same table - just do
>
> MyTable.createTable(ifNotExists=True, connection=connection2)
>
> > And after that, it is not necessary to take care about the connection in
> the
> > rest of the code?
>
> No, after
On Tue, Feb 05, 2008 at 10:27:05PM +0100, Petr Jake?? wrote:
> So you mean it is OK to crate table object using:
>
> db_filename = 'c|\\Program
> Files\\Firebird\\Firebird_2_0\\examples\\empbuild\\automat.fdb'
> connection_string = 'firebird://127.0.0.1:3050/' + db_filename
> connection = connecti
You cannot do this with sqlhub. You have to pass the second connection
> as the connection parameter to all SQLObject methods:
>
> connection2 = connectionForURI('sqlite:///work/mincovnik.db')
> ATable.select(clause, connection=connection2)
>
> Oleg.
So you mean it is OK to crate table obje
On Tue, Feb 05, 2008 at 08:55:35PM +0100, Petr Jake?? wrote:
> Hi,
> I have not clue how to realize simultaneous conection for two different
> databases in one script.
>
> For example:
>
> 1)
> db_filename = '/opt/firebird/examples/empbuild/automat.fdb'
> connection_string = 'firebird://127.0.0.1
Hi,
I have not clue how to realize simultaneous conection for two different
databases in one script.
For example:
1)
db_filename = '/opt/firebird/examples/empbuild/automat.fdb'
connection_string = 'firebird://127.0.0.1:3050/' + db_filename
connection = connectionForURI(connection_string)
sqlhub.p