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
nocount ON
2007-06-12 18:20:40,924 INFO sqlalchemy.engine.base.Engine.0x..b0 None
2007-06-12 18:20:40,924 INFO sqlalchemy.engine.base.Engine.0x..b0
SELECT [COLUMNS_eba4].[TABLE_SCHEMA], [COLUMNS_eba4].[TABLE_NAME],
[COLUMNS_eba4].[COLUMN_NAME], [COLUMNS_eba4].[IS_NULLABLE],
[COLUMNS_eba4].[DATA_TYPE], [COLUMNS_eba4].[ORDINAL_POSITION],
[COLUMNS_eba4].[CHARACTER_MAXIMUM_LENGTH], [COLUMNS_eba4].
[NUMERIC_PRECISION], [COLUMNS_eba4].[NUMERIC_SCALE], [COLUMNS_eba4].
[COLUMN_DEFAULT]
FROM [INFORMATION_SCHEMA].[COLUMNS] AS [COLUMNS_eba4]
WHERE [COLUMNS_eba4].[TABLE_NAME] = ? AND [COLUMNS_eba4].
[TABLE_SCHEMA] = ? ORDER BY [COLUMNS_eba4].[ORDINAL_POSITION]
2007-06-12 18:20:40,940 INFO sqlalchemy.engine.base.Engine.0x..b0
['zones', 'dbo']
Traceback (most recent call last):
File "<pyshell#6>", line 1, in -toplevel-
zones_table = Table('zones', metadata, autoload=True)
File "build\bdist.win32\egg\sqlalchemy\schema.py", line 166, in
__call__
File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 809, in
reflecttable
File "build\bdist.win32\egg\sqlalchemy\databases\mssql.py", line
506, in reflecttable
NoSuchTableError: zones
>>>
I think that was what you guys meant by query logging....
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---