you have a trailing comma at the end of the statement.
its a long string probably easier to paste it into a .py file and run that.
On Jan 24, 2011, at 9:06 PM, Mark Sharp wrote:
> This is the result that I received.
>
> >>> conn = pyodbc.connect("DSN=frankie-w7-animal-sa;UID=sa;PWD=select $ from
> >>> Bill")
> >>> cursor = conn.cursor()
> >>> cursor.execute(u"""
> ... SELECT [COLUMNS_1].[TABLE_SCHEMA],
> ... [COLUMNS_1].[TABLE_NAME],
> ... [COLUMNS_1].[COLUMN_NAME],
> ... [COLUMNS_1].[IS_NULLABLE],
> ... [COLUMNS_1].[DATA_TYPE],
> ... [COLUMNS_1].[ORDINAL_POSITION],
> ... [COLUMNS_1].[CHARACTER_MAXIMUM_LENGTH],
> ... [COLUMNS_1].[NUMERIC_PRECISION],
> ... [COLUMNS_1].[NUMERIC_SCALE],
> ... [COLUMNS_1].[COLUMN_DEFAULT],
> ... [COLUMNS_1].[COLLATION_NAME]
> ... FROM [INFORMATION_SCHEMA].[COLUMNS] AS [COLUMNS_1]
> ... WHERE [COLUMNS_1].[TABLE_NAME] = ? AND [COLUMNS_1].[TABLE_SCHEMA]
> = ?
> ... ORDER BY [COLUMNS_1].[ORDINAL_POSITION],
> ... """,(u'tf_valid_species', u'dbo'))
> Traceback (most recent call last):
> File "<stdin>", line 16, in <module>
> pyodbc.ProgrammingError: ('42000', '[42000] [Actual][SQL Server] Statement(s)
> could not be prepared. (8180) (SQLExecDirectW)')
>
> R. Mark Sharp, Ph.D.
> [email protected]
>
>
>
>
> On Jan 24, 2011, at 7:42 PM, Michael Bayer wrote:
>
>> cursor = conn.cursor()
>>
>
>
> --
> 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.
--
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.