zzzeek / test_sqlalchemy

0 stars 0 forks source link

[PACTH] Add a new argument handling for the mssql engine on odbc: autotranslate #1005

Closed sqlalchemy-bot closed 15 years ago

sqlalchemy-bot commented 16 years ago

Issue created by Anonymous


This patch adds the possibility to autotranslate=No as an argument on the dburi:

exemple:

dburi = "mssql://user:pass@localhost/testdb?autotranslate=No"

this will enable users to override the default settings (at least on windows) that force the translation of textual data. This way a french windows host will be able to connect to a greek database (with a collation name set to cp1253) and the ODBC layer will not try to translate the textual data.

The intended usage for those cases is to have a model that uses TEXT for the column and then pass convert_unicode=True and encoding="%s" % yourencodinghere on the create_engine() call...

We have worked together with Jerôme Collette and me (Florent Aide) on this patch and this works with live production data from a cp1253 encoded database (Greek) from French Windows XP machines using MDAC 2.8.1

Best regards, Florent.


Attachments: sa_mssqlodbc_autotranslate_patch.diff

sqlalchemy-bot commented 10 years ago

Michael Bayer (zzzeek) wrote:


Removing milestone: 0.5.xx (automated comment)

sqlalchemy-bot commented 15 years ago

Michael Bayer (zzzeek) wrote:


someone from the MS-SQL side wants to evaluate this plz ?

sqlalchemy-bot commented 16 years ago

Anonymous wrote:


Patch to add the autotranslate dburi argument for MSSQL ODBC.

sqlalchemy-bot commented 15 years ago

Michael Trier (empty) wrote:


This was corrected already with the odbc_autotranslate parameter. Additionally, dfd71d6ac86dd6be197232f56e20f6d28f41afa0 now handles connect args like normal and you can pass any other parameters you want to the backend as demonstrated here: http://www.sqlalchemy.org/docs/05/dbengine.html#dbengine_establishing_custom

sqlalchemy-bot commented 10 years ago

Changes by Michael Bayer (zzzeek): removed "0.5.xx" milestone

sqlalchemy-bot commented 15 years ago

Changes by Michael Bayer (zzzeek): set milestone to "0.5.xx"

sqlalchemy-bot commented 16 years ago

Changes by Anonymous: set attachment to "sa_mssqlodbc_autotranslate_patch.diff"

sqlalchemy-bot commented 15 years ago

Changes by Michael Trier (empty): set state to "resolved"