MS Access & foreign encoding bug - Mailing list pgsql-odbc

From Philippe Lang
Subject MS Access & foreign encoding bug
Date
Msg-id 6C0CF58A187DA5479245E0830AF84F42080674@poweredge.attiksystem.ch
Whole thread Raw
List pgsql-odbc
Hi,

I have just tested PSQLODBC-libpq version 8.01.00.02 with MS Access, and
until now, I have not noticed anything special compared to the non-libpq
version. Thanks to all who support the driver.

A bug has appeared with version 209 of the driver, and has not been
corrected since then. It is apparently linked to foreign encodings.
Version 208 of the driver does not suffer from that at all. That's the
one I use for production at the moment.

The libpq version has the same problem. When opening certain records, MS
Access fails with error '2467': the expression references an object that
was closed or deleted. Or sometimes: "You tried to affect the NULL value
to a variable that is not of type Variant."

Here is some log output. Tell me if there is any specific test I can do
for you, in order to track down the bug.

Regards,

Philippe



Here is the log when Access fails: (record 40438)
----------------------------------

----> BEGIN

            henv=182591376, conn=182620168, status=0, num_stmts=16
conn=182620168, PGAPI_DriverConnect( in)='DSN=corisdb;',
fDriverCompletion=3
DSN info:
DSN='corisdb',server='raid.attiksystem.ch',port='5432',dbase='corisdb',u
ser='pgsql',passwd='xxxxx'

onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0
'
          conn_settings='',conn_encoding='OTHER'
          translation_dll='',translation_option=''
Global Options: Version='08.01.0002', fetch=100, socket=8192,
unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
                disable_optimizer=1, ksqo=1, unique_index=1,
use_declarefetch=0
                text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=1 NAMEDATALEN=64
                extra_systable_prefixes='dd_;', conn_settings=''
conn_encoding='OTHER'
conn=182620168, query='select version()'
    [ PostgreSQL version string = 'PostgreSQL 7.4.5 on
i386-portbld-freebsd4.10, compiled by GCC 2.95.4' ]
    [ PostgreSQL version number = '7.4' ]
conn=182620168, query='set DateStyle to 'ISO''
conn=182620168, query='set geqo to 'OFF''
conn=182620168, query='set extra_float_digits to 2'
conn=182620168, query='select oid from pg_type where typname='lo''
conn=182620168, query='select pg_client_encoding()'
    [ Client encoding = 'LATIN1' (code = 8) ]
conn=182620168,
PGAPI_DriverConnect(out)='DSN=corisdb;DATABASE=corisdb;SERVER=raid.attik
system.ch;PORT=5432;UID=pgsql;PWD=;A6=;A7=100;A8=8192;B0=254;B1=8190;BI=
0;C2=dd_;;CX=1b507a9'
conn=182620168, query='SELECT * FROM public."search_dossier"('%40438');'
conn=182620168, PGAPI_Disconnect
conn=182597992, PGAPI_Disconnect

----> END


Here is the log when Access does not fail: (record 40439)
------------------------------------------

----> BEGIN

            henv=181739408, conn=181768200, status=0, num_stmts=16
conn=181768200, PGAPI_DriverConnect( in)='DSN=corisdb;',
fDriverCompletion=3
DSN info:
DSN='corisdb',server='raid.attiksystem.ch',port='5432',dbase='corisdb',u
ser='pgsql',passwd='xxxxx'

onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0
'
          conn_settings='',conn_encoding='OTHER'
          translation_dll='',translation_option=''
Global Options: Version='08.01.0002', fetch=100, socket=8192,
unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190
                disable_optimizer=1, ksqo=1, unique_index=1,
use_declarefetch=0
                text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=1 NAMEDATALEN=64
                extra_systable_prefixes='dd_;', conn_settings=''
conn_encoding='OTHER'
conn=181768200, query='select version()'
    [ PostgreSQL version string = 'PostgreSQL 7.4.5 on
i386-portbld-freebsd4.10, compiled by GCC 2.95.4' ]
    [ PostgreSQL version number = '7.4' ]
conn=181768200, query='set DateStyle to 'ISO''
conn=181768200, query='set geqo to 'OFF''
conn=181768200, query='set extra_float_digits to 2'
conn=181768200, query='select oid from pg_type where typname='lo''
conn=181768200, query='select pg_client_encoding()'
    [ Client encoding = 'LATIN1' (code = 8) ]
conn=181768200,
PGAPI_DriverConnect(out)='DSN=corisdb;DATABASE=corisdb;SERVER=raid.attik
system.ch;PORT=5432;UID=pgsql;PWD=;A6=;A7=100;A8=8192;B0=254;B1=8190;BI=
0;C2=dd_;;CX=1b507a9'
conn=181768200, query='SELECT * FROM public."search_dossier"('%40439');'
conn=181768200, PGAPI_Disconnect
conn=181746024, query='SELECT "public"."adresses"."id"
,"public"."adresses"."nom" ,"public"."adresses"."prenom"
,"public"."adresses"."npa" ,"public"."adresses"."localite"
,"public"."types_adresses"."type"  FROM "public"."adresses" LEFT OUTER
JOIN "public"."types_adresses" ON
("public"."adresses"."code_type_adresse" =
"public"."types_adresses"."code" )  ORDER BY "public"."adresses"."id"  '
conn=181746024, query='SELECT "id" ,"id_adresse_compagnie_cliente"
,"code_collaborateur" ,"code_type_dossier" ,"code_type_etat_dossier"
,"numero" ,"reference" ,"date_survenance" ,"lieu_sinistre"
,"description_sinistre" ,"montant_honoraires" ,"montant_frais_bancaires"
,"date_saisie" ,"rapport_police" ,"constat_amiable"
,"code_responsabilite_client" ,"taux_responsabilite_client" ,"remarques"
,"reference_mobi24"  FROM "public"."dossiers" ORDER BY
"public"."dossiers"."id_adresse_compagnie_cliente"

... ETC ...

----> END

pgsql-odbc by date:

Previous
From: "Anoop Kumar"
Date:
Subject: Re: [Patch] SSL Support
Next
From: "Philippe Lang"
Date:
Subject: Re: ODBC Driver