Thread: MS Access & foreign encoding bug

MS Access & foreign encoding bug

From
"Dave Page"
Date:
I've spent some time working on this bug and although I've not figured
out exactly what the problem is, I think I've narrowed it down to a
problem in copy_and_convert_field in convert.c, however I've been
staring at it too long now and I can't get my braincells around what's
going on.

It appears to be a length issue - according to the mylog output from a
simple test case I figured out with Philippe's help, when retrieving
data in multiple calls to SQLGetData, the second call trys to get a
coulpe of bytes too many, which I believe is what causes Access 2k3 to
complain about there being NULL values in the data. I managed to get
Access to like it by fiddling with the length calculations, but broke
something else with each variation of what I was trying.

Hopefully one of Anoop's guys, or someone else can take a look and spot
the problem (which has probably been staring me in the face!).

A simple test case is attached. I've been able to reproduce the bug by
loading the attached table into an SQL_ASCII database, then executing
"select * from foo" in a Passthrough query in Access 2k3. Oh, and if the
data is shortened to <384 chars, it all seems to work fine!

Regards, Dave

Attachment