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(SQLObject):
> > >    _connection = connection2
> >
> >   BTW, both _connection and the parameter to .setConnection() can be a
> > DB
> > URI string - SQLObject calls connectionForURI() itself.
> >
> >
it looks it is necessary first to call:
connection2 = connectionForURI('sqlite:///work/mincovnik.db')
and than:
class MyTable2(SQLObject):
    ......

MyTable2.createTable(ifNotExists=True, connection=connection2)

If I do only:
class MyTable2(SQLObject):
    _connection = 'sqlite:///work/mincovnik.db'
    .......

MyTable2.createTable(ifNotExists=True)

or:
connection2 = connectionForURI('sqlite:///work/mincovnik.db')
class MyTable2(SQLObject):
    _connection = connection2
    .....

MyTable2.createTable(ifNotExists=True)

than the db file '/work/mincovnik.db' is not created

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

Reply via email to