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 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 = connectionForURI(connection_string)
sqlhub.processConnection = connection
connection2 = connectionForURI('sqlite:///work/mincovnik.db')
and than creating tables like:
- MyTable1.createTable(ifNotExists=True)
I mean: if not definning the connection, tables will be creted using
connection from the sqlhub
- MyTable2.createTable(ifNotExists=True, connection=connection2)
I mean: if connection is defined, than the table will be created using
specified connection
And after that, it is not necessary to take care about the connection in the
rest of the code?
Petr
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss