On 29 Jul 2009, at 05:43, Michael Trier wrote: > Hi > > On Tue, Jul 28, 2009 at 3:14 PM, Ed Singleton > <[email protected]> wrote: > > On 26 Jul 2009, at 15:06, Michael Bayer wrote: > > > > > i have freetds 0.82, pyodbc 2.1.4. except for binary it mostly > works > > fine (with sqla 0.6). > > > Is that on Mac, Linux or both? > > Did you do any particular configuration of character encodings? > > I've worked a lot recently in both of these environments. With Mac > and Linux I've experienced the same behavior; that is that you can't > pass unicode statements and you can't pass unicode parameters > directly, like you can when working just with pyodbc on Windows. > With Mac and Linux you need to ensure that:
Hmm. I'm definitely getting different behaviours on Mac and Linux. On the Mac, it seems to be working pretty much fine. Linux appears to be working okay as long as all the characters are in the ascii range. This may be complicated by the fact that the database mixes varchar, text, nvarchar and ntext within the same table. It's also complicated by the fact that I know very little about SQL Server, and not that much more about Windows. > engine.dialect.supports_unicode = False > engine.dialect.supports_unicode_statements = False > > Additional I've had to set convert_unicode to True and the encoding > to Latin1. Thanks for this. This is what I was intending to look into today, so you've saved me quite a bit of time. I've tried it out and the only difference these make, is that I receive lots of warnings about "Unicode type received non-unicode bind param value" for all the ntext and nvarchar columns. > Finally my stack is: > > Mac: SA -> iODBC -> FreeTDS -> pyodbc -> MSSQL > Ubuntu: SA -> unixODBC -> FreeTDS -> pyodbc -> MSSQL > > Of course you can remove the xODBC part of the equation if you want, > but the results are the same. Are you sure this is correct? I'd understood the order of my stack to be: Mac: SA -> pyodbc -> unixODBC -> FreeTDS -> MSSQL Ubuntu: SA -> pyodbc -> unixODBC -> FreeTDS -> MSSQL With pyodbc being a layer between SA and freetds, and as you said, xODBC being optional if you don't mind not using DSNs. Thanks Ed --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
