Обсуждение: MS Access & foreign encoding bug

Поиск
Список
Период
Сортировка

MS Access & foreign encoding bug

От
"Philippe Lang"
Дата:
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

Re: MS Access & foreign encoding bug

От
"Philippe Lang"
Дата:
I have some more informations that may help you: the problem in the driver since version 209 only appears in Access
whenusing a "pass-through query", a query sent directly to the database, just as we would type it in PGAdmin. The same
query,but through "linked tables", is ok. 

I was not able to find out what in the record makes Access pass-through query fail, but it appears to be linked to text
fieldsin the database. I have a specific record, filled with some multiline text, that cannot be retreived with a
pass-throughquery. If I change some characters in the text, it works sometimes, but sometimes it still fails. If I copy
andpast the text twice in the text field, it suddenly works too... There is apprently no specific characters string or
stringlength that bugs, weird! 

Philippe

-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] De la part de Philippe Lang
Envoyé : lundi, 25. juillet 2005 14:00
À : pgsql-odbc@postgresql.org
Objet : [ODBC] MS Access & foreign encoding bug

Hi,

I have just tested PSQLODBC-libpq version 8.01.00.02 with MS Access, and until now, I have not noticed anything special
comparedto 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
foreignencodings. 
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
referencesan object that was closed or deleted. Or sometimes: "You tried to affect the NULL value to a variable that is
notof 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org



Re: MS Access & foreign encoding bug

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Philippe Lang
> Sent: 26 July 2005 07:13
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] MS Access & foreign encoding bug
>
> I have some more informations that may help you: the problem
> in the driver since version 209 only appears in Access when
> using a "pass-through query", a query sent directly to the
> database, just as we would type it in PGAdmin. The same
> query, but through "linked tables", is ok.
>
> I was not able to find out what in the record makes Access
> pass-through query fail, but it appears to be linked to text
> fields in the database. I have a specific record, filled with
> some multiline text, that cannot be retreived with a
> pass-through query. If I change some characters in the text,
> it works sometimes, but sometimes it still fails. If I copy
> and past the text twice in the text field, it suddenly works
> too... There is apprently no specific characters string or
> string length that bugs, weird!

Can you post pg_dump output of that record and the table it's in please?

I just tried passthrough queries in Access here, and the only problem I
get is it bleating about finding null values in non-variant column
types, which seems a little bizarre.

Regards, Dave.