Looks like you have a GUID column in that table, and MSSQL does not (yet)
have a GUID type. Are you able to reflect tables without that type?
On 4/2/07, Frans H. <[EMAIL PROTECTED]> wrote:
>
>
> After discovering sqlalchemy and falling in love with the easy I can
> reach my mysql & postgresql servers I figured I'd try to include the
> mssql servers at work also!
>
> I managed to get pymssql + freedst working, I can connect to the
> database.
> I am trying to autoload some table and thats where it goes bad!
>
> INFO:sqlalchemy.engine.base.Engine.0x..2c:SELECT [COLUMNS_ac16].
> [TABLE_SCHEMA], [COLUMNS_ac16].[TABLE_NAME], [COLUMNS_ac16].
> [COLUMN_NAME], [COLUMNS_ac16].[IS_NULLABLE], [COLUMNS_ac16].
> [DATA_TYPE], [COLUMNS_ac16].[ORDINAL_POSITION], [COLUMNS_ac16].
> [CHARACTER_MAXIMUM_LENGTH], [COLUMNS_ac16].[NUMERIC_PRECISION],
> [COLUMNS_ac16].[NUMERIC_SCALE], [COLUMNS_ac16].[COLUMN_DEFAULT]
> FROM [INFORMATION_SCHEMA].[COLUMNS] AS [COLUMNS_ac16]
> WHERE [COLUMNS_ac16].[TABLE_NAME] = %(COLUMNS_TABLE_NAME)s AND
> [COLUMNS_ac16].[TABLE_SCHEMA] = %(COLUMNS_TABLE_SCHEMA)s ORDER BY
> [COLUMNS_ac16].[ORDINAL_POSITION]
> INFO:sqlalchemy.engine.base.Engine.0x..2c:{'COLUMNS_TABLE_NAME':
> 'UserData', 'COLUMNS_TABLE_SCHEMA': 'dbo'}
> DEBUG:sqlalchemy.engine.base.Engine.0x..2c:Row ('dbo', 'UserData',
> 'tp_ID', 'NO', 'int', 1, None, 10, 0, None)
> DEBUG:sqlalchemy.engine.base.Engine.0x..2c:Row ('dbo', 'UserData',
> 'tp_ListId', 'NO', 'uniqueidentifier', 2, None, None, None, None)
> Traceback (most recent call last):
> File "ms.py", line 26, in <module>
> dbo = Table('UserData', metadata, autoload=True)
> File "build/bdist.freebsd-6.1-RELEASE-i386/egg/sqlalchemy/
> schema.py", line 142, in __call__
> File "build/bdist.freebsd-6.1-RELEASE-i386/egg/sqlalchemy/engine/
> base.py", line 526, in reflecttable
> File "build/bdist.freebsd-6.1-RELEASE-i386/egg/sqlalchemy/databases/
> mssql.py", line 498, in reflecttable
> KeyError: 'uniqueidentifier'
>
>
> Any ideas ? Seems to be a special type perhaps ? I have no clue.....
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---