On Nov 20, 2012, at 10:02 AM, Theanoula wrote:
> Hello!
>
> I am trying to connect to a database as follows:
>
> ENGINECOM = create_engine('mssql+pyodbc://usr:pass@MyDSN')
> METACOM = MetaData(bind=ENGINECOM)
>
> COM_TABLE_ORDERHEADER = Table('table', METACOM, autoload=True)
>
> My problem is that the table owner in MsSql database is different than 'dbo'
> , resulting in getting errors on the Selects I do. As much as I searched for,
> I couldn't find how/where to declare the owner.
>
> Could you please help me in some way.
best way is to change the default "owner" on your connection, short of that use
the schema argument on table: Table('t', metadata, schema="myschema")
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.