I don't think you are supposed to open more than one connection to a SQLite 
database at a time. It is file-based and doesn't have multi-connection 
abilities like other databases like MySQL and PostgreSQL.

On Monday, May 14, 2012 7:29:44 AM UTC-4, simon wrote:
>
> *In the following code I create a new table in db1. However when I open a 
> second DAL connection to the same database the new table is not shown. Why 
> is that?*
> *
> *
> *db1 = DAL('sqlite://storage.sqlite', folder=dbfolder, auto_import=True)*
> *print(db1.tables)*
> *
> *
> *db1.executesql("DROP TABLE IF EXISTS test;")*
> *print(db1._timings)*
> *try:*
> *    os.remove(dbfolder+"/test.table")*
> *except:*
> *    pass*
> *    *
> *db1.define_table('test', Field('testfield'), migrate='test.table')*
> *db1.commit()*
> *print(db1.tables)*
> *
> *
> *db2 = DAL('sqlite://storage.sqlite', folder=dbfolder, auto_import=True)*
> *print(db2.tables)*
>

Reply via email to