On Wednesday 16 May 2007 23:56:23 David McNab wrote:
> Hi,
>
> I've got several SQlite databases, each with the same tables and
> schemas.
>
> What's the best way to move data between them?
>
> I understand that with SQLObject, one can make a connection to a single
> database global, as in:
>
>    conn = SQLiteConnection("/path/to/dbfile.sqlite")
>    sqlhub.processConnection = conn
>
> or one can assign the connection on a per-class basis, as in:
>
>    class SomeTable(SQLObject):
>        col1 = StringCol()
>        ...
>
>    ...
>
>    SomeTable._conn = conn
>
> But what if I have n sqlite database files, each with the same tables
> and schemas, and want to dynamically access them and move data between
> them?
>
> IIRC, SQLObject keeps a 'registry' of declared tables, so it wouldn't be
> legal to have n different table classes of the same name, each using a
> different database connection.
>
> What should I do?
>
> Thanks for any help..
>
> Cheers
> David

you may want to look into this 
Example 5.16

http://hk-classes.sourceforge.net/tutorials/knodascriptingtutorial/bk01ch05s12.html

it's really powerful
-- 
cu
ferdinand

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to