[sqlalchemy] Re: SA support for SQLite ATTACH?

2007-05-01 Thread VN

I tried the following:

import sqlalchemy as SA
md_dbA=SA.BoundMetaData('dbA')
tbl_dbAtbl=SA.Table('dbAtbl',md_dbA,autoload=True)

SA.text(ATTACH DATABASE 'C:Temp\dbB.db' as dbB_db)
tbl_dbBtbl=SA.Table('dbB_db.dbBtbl',md_dbA,schema='dbB_db',autoload=True)
===

The code fails on the line marked above. Did I mis-understand what you
said?

Also, how do I look at the echoed SQL for text function?

On Apr 30, 9:07 am, Michael Bayer [EMAIL PROTECTED] wrote:
 On Apr 30, 2007, at 8:13 AM, VN wrote:

 you might need to use a Table with a schema='dbA_db', just a
 guess.  look at the echoed sql and see if it matches things that work
 at the sqlite console.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: SA support for SQLite ATTACH?

2007-05-01 Thread VN

I tried the following:

import sqlalchemy as SA
md_dbA=SA.BoundMetaData('dbA')
tbl_dbAtbl=SA.Table('dbAtbl',md_dbA,autoload=True)

SA.text(ATTACH DATABASE 'C:Temp\dbB.db' as dbB_db)
tbl_dbBtbl=SA.Table('dbB_db.dbBtbl',md_dbA,schema='dbB_db',autoload=True)
===

The code fails on the line marked above. Did I mis-understand what you
said?

Also, how do I look at the echoed SQL for text function?

On Apr 30, 9:07 am, Michael Bayer [EMAIL PROTECTED] wrote:
 On Apr 30, 2007, at 8:13 AM, VN wrote:

 you might need to use a Table with a schema='dbA_db', just a
 guess.  look at the echoed sql and see if it matches things that work
 at the sqlite console.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---