[egenix-users] SQL Server 2000, mxODBC and unicode problem

M.-A. Lemburg mal at egenix.com
Wed Jan 5 18:02:38 CET 2005


Charlie Clark wrote:
> On 2005-01-05 at 14:12:14 [+0100], Marcin <tupteq at tlen.pl> wrote:
> 
>>Hello Charlie,
>>
>>Tuesday, January 4, 2005, 7:45:04 PM, you wrote:
>>
>>
>>>just a thought, but if have you tried using MIXEDSTRINGFORMAT? It seems 
>>>that
>>>switching between encodings is what is upsetting the driver and as
>>>Marc-André has pointed out None will be passed as a non-unicode "NULL".
>>
>>MIXED_STRINGFORMAT changed nothing, the same error :(
> 
> Well, it was just a suggestion... it's very difficult sometimes to pinpoint 
> the exact problem without access to the same environment. As Marc-André has 
> written unicode support has improved in DBs and drivers but there are still 
> lots of issues particularly in the drivers which we can't anticipate.

Another possible candidate is NATIVE_UNICODE_STRINGFORMAT. This
will force mxODBC to pass the Unicode value as-is to the driver...

>>I found one more way to exec this query without change -
>>executedirect().
> 
> That's good to know.

...however, your findings really suggest that something is wrong
with the driver.

The difference between .execute() and
.executedirect() is that the statements are not prepared for
execution, but passed to the server more or less as-is (together
with the parameters).

The fact that .executedirect() works while .execute()
doesn't suggests to me, that the driver is having a problem
whereas the server can deal with the syntax just fine.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 05 2005)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list