On Jul 28, 2011, at 10:34 AM, Michael Kvyatkovskiy wrote:

> Hello.
> 
> I'm using Microsoft Sql Server 2008, sqlalchemy 0.7.1.
> 
> When I'm trying to create table using metadata.create_all method with 
> checkfirst=True, an axception is raised. 
> I set option convert_unicode=True in engine initialization. Here is the 
> backtrace:

It appears you're running your script on windows so convert_unicode should not 
be needed, and it is in fact sending unicode strings directly as pyodbc 
supports this on windows.

the test case you'd like to try is (see 
http://code.google.com/p/pyodbc/wiki/ConnectionStrings for connect strings) :

import pyodbc
conn = pyodbc.connect("DRIVER={SQL 
Server};SERVER=cloak;DATABASE=test;UID=user;PWD=password")
cursor = conn.cursor()
cursor.execute("select * from [INFORMATION_SCHEMA].[COLUMNS] where 
[COLUMNS_1].[TABLE_NAME]=?", ' (u'table_name',))
print cursor.fetchall()

if this doesn't work, try removing the u'', however it really shouldn't matter. 
 I'd ask on the Pyodbc list if the above statement is producing a problem.



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to