Re: [sqlalchemy] SQLAlchemy and Linked Server (SQL Server)

2014-05-26 Thread Michael Bayer
You need to establish "mydsn" as an ODBC datasource name. How to do this depends greatly on what platform you're connecting from.Options include: windows: http://technet.microsoft.com/en-us/library/ms188681%28v=sql.105%29.aspx freeTDS: http://www.freetds.org/userguide/prepodbc.htm etc.

Re: [sqlalchemy] (ProgrammingError) can interpret 8-bit bytestrings

2014-05-26 Thread Michael Bayer
Here's a full test. Please modify this test script in order to reproduce your error. # coding: utf-8 from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() engine = create_engine('sqlite:///', echo=True) class A

Re: [sqlalchemy] (ProgrammingError) can interpret 8-bit bytestrings

2014-05-26 Thread Afonso Rodrigues
but, I use: algoritimo.complexidadeEspacos = u'O(n) total, O(1) auxiliar' but the error continues. 2014-05-26 16:36 GMT-03:00 Michael Bayer : > that’s a pysqlite error, not SQLAlchemy, please use Python unicode > objects, e.g. u’mystring’, for unicode strings. > > > On May 26, 2014, at 1:35 PM,

Re: [sqlalchemy] (ProgrammingError) can interpret 8-bit bytestrings

2014-05-26 Thread Michael Bayer
that's a pysqlite error, not SQLAlchemy, please use Python unicode objects, e.g. u'mystring', for unicode strings. On May 26, 2014, at 1:35 PM, Afonso Rodrigues wrote: > Hi, > I using do SqlAlchemy with python 2.7.6 > > I came across: > > sqlalchemy.exc.ProgrammingError: (ProgrammingError)

[sqlalchemy] (ProgrammingError) can interpret 8-bit bytestrings

2014-05-26 Thread Afonso Rodrigues
Hi, I using do SqlAlchemy with python 2.7.6 I came across: sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8-bit bytes trings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch yo

[sqlalchemy] SQLAlchemy and Linked Server (SQL Server)

2014-05-26 Thread Massi
Hi everyone, I'm trying to access data from a linked server using SQLalchemy (0.9.4), The usual connection established via pyodbc (engine = create_engine( 'mssql+pyodbc://scott:tiger@mydsn')) does not seem to work. Actually I can only read the data with SQL Server using SQL Management Studio and