[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-13 Thread one.person
Thanks a lot for the help guys. I got this to work by specifying the schema="" argument properly. It turns out I had to specify the 'schema' argument to Table() as what MSSQL refers to as the 'Owner' of the table in enterprise manager. Still confused over the difference between schema and owner

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread Rick Morrison
That looks OK to me. Try pasting that query (cleaned-up) into a query window on Enterprise Manager and see what kind of results you get. The "?" arguments are positional, so the first would be the table 'zone'; the second the schema 'dbo'. On 6/12/07, one.person <[EMAIL PROTECTED]> wrote: > > >

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread one.person
Thanks for all the quick replies. Currently on pyodbc 2.0.3.6. Anyway, I tried this (the table 'zones' most definitely exists): >>> metadata.engine.echo = True >>> zones_table = Table('zones', metadata, autoload=True) 2007-06-12 18:20:40,924 INFO sqlalchemy.engine.base.Engine.0x..b0 SET nocoun

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread Michael Bayer
On Jun 12, 9:04 pm, "one.person" <[EMAIL PROTECTED]> wrote: > So all of the above was done with Windows XP, Python 2.4.3, pymssql > 0.7.4, and MSSQL 2000. I upgraded to pymssql 0.8.0 with the same > results. I uninstalled that and installed pyodbc 2.0.3.6, same > results. > > The obvious diffe

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread Rick Morrison
I don't think you'll have a lot of luck with the schema/owner arguments; it's most likely an environmental issue with your MSSQL install, there are a lot of settings for MSSQL that can play havoc with table reflection. Try logging the SQL that's being generated, that might point out the issue. Or

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread one.person
So all of the above was done with Windows XP, Python 2.4.3, pymssql 0.7.4, and MSSQL 2000. I upgraded to pymssql 0.8.0 with the same results. I uninstalled that and installed pyodbc 2.0.3.6, same results. The obvious differences between my installation and yours is that I am using MSSQL 2000 an

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread Rick Morrison
Works in Windows, too, sqlalchemy 0.3.8, Python 2.5, pymssql 0.8.0, MSSQL 2005 Try upgrading your pymssql if you're not at 0.8.0. If that won't work, then I would suggest a switch to pyodbc Rick On 6/12/07, one.person <[EMAIL PROTECTED]> wrote: > > > > > one.person > View profile > Mor

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread one.person
one.person View profile More options Jun 12, 5:12 pm From: "one.person" <[EMAIL PROTECTED]> Date: Wed, 13 Jun 2007 00:12:50 - Local: Tues, Jun 12 2007 5:12 pm Subject: Re: mssql reflection NoSuchTableError Reply | Reply to author | Forward | Print | Individual message | Show origina

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread one.person
Thanks for the quick reply, I have additional info after more experimentation. This works fine in a single python session as shown: >>> from sqlalchemy import * >>> db = create_engine('mssql://login:[EMAIL PROTECTED]/dbname') >>> metadata = BoundMetaData(db) >>> z_table = Table('z_table', metada

[sqlalchemy] Re: mssql reflection NoSuchTableError

2007-06-12 Thread Rick Morrison
Just tried it here on a Linux + pymssql box and it worked fine. The 'NoSuchTable' error would indicate that the table is not found, as you surmised. Check to make sure the table is really persisting after your first session with the table create. In the meantime, I'll see if I can get pymssql run