MS Access & foreign encoding bug

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <pgsql-odbc(at)postgresql(dot)org>
Cc: "Philippe Lang" <philippe(dot)lang(at)attiksystem(dot)ch>, "Anoop Kumar" <anoopk(at)pervasive-postgres(dot)com>
Subject: MS Access & foreign encoding bug
Date: 2005-07-27 13:06:23
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9584@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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 Content-Type Size
foo.sql application/octet-stream 1.1 KB

Browse pgsql-odbc by date

  From Date Subject
Next Message Merlin Moncure 2005-07-27 13:20:37 Re: Ok... I got most of it working but . . .
Previous Message Merlin Moncure 2005-07-26 19:51:02 Re: Lowercase folding - simple patch?