SQLGetDiagRec, sqlstate returned?

SQLGetDiagRec, sqlstate returned?

am 08.02.2008 17:02:52 von Doris.Heiser

--_000_238C17DBF4050B40991C6D06B241D7D37E1ED9FC6EABGEX73EFSC NE_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I have some problems with sqlstates returned from SQLGetDiagRec with psqlod=
bc. We use PostgreSQL with psqlodbc on Linux systems.

We do at least some checks on sqlstates returned from PostgreSQL within our=
application to implement some specific error reactions.

This worked fine with psqlodbc 08.01.0200 and PostgreSQL 8.1.9. We used to =
get a specific sqlstate and error message, e.g. "22021", "invalid byte sequ=
ence for encoding...".

Now we changed to psqlodbc 08.02.0500 and PostgreSQL 8.2.5. In the very sam=
e error situation we still see the error message as before. The sqlstate ob=
tained with SQLGetDiagRec however seems to be always "HY000" (general error=
) in more or less any error situation.

I still see the sqlstate within PostgreSQL error log, so I guess the "HY000=
" is coming from the odbc driver. Can someone give me some help with this p=
roblem? Are we missing something in our application or is this normal behav=
ior of the current driver version?

Thanks in advance and best regards,
Doris Heiser









--_000_238C17DBF4050B40991C6D06B241D7D37E1ED9FC6EABGEX73EFSC NE_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">












0.0pt;
font-family:Arial'>Hi,



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>I have some problems with sqlstates returned from SQLGet=
DiagRec
with psqlodbc. We use PostgreSQL with psqlodbc on Linux systems.=



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>We do at least some checks on sqlstates returned from Po=
stgreSQL
within our application to implement some specific error reactions. :p>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>This worked fine with psqlodbc 08.01.0200 and PostgreSQL
8.1.9. We used to get a specific sqlstate and error message, e.g. “22=
021”,
“invalid byte sequence for encoding…”.
=



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>Now we changed to psqlodbc 08.02.0500 and PostgreSQL 8.2=
..5. In
the very same error situation we still see the error message as before. The
sqlstate obtained with SQLGetDiagRec however seems to be always “HY00=
0”
(general error) in more or less any error situation.
t>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>I still see the sqlstate within PostgreSQL error log, so=
I
guess the “HY000” is coming from the odbc driver. Can someone g=
ive
me some help with this problem? Are we missing something in our application=
or
is this normal behavior of the current driver version?
ont>



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'>Thanks in advance and best regards,
font>



0.0pt;
font-family:Arial'>Doris Heiser



0.0pt;
font-family:Arial'> 



0.0pt;
font-family:Arial'> 



'font-size:
12.0pt'> 



'font-size:
12.0pt'> 



'font-size:
12.0pt'> 





'font-size:
12.0pt'> 









--_000_238C17DBF4050B40991C6D06B241D7D37E1ED9FC6EABGEX73EFSC NE_--

Re: SQLGetDiagRec, sqlstate returned?

am 08.02.2008 18:24:32 von Hiroshi Inoue

Heiser, Doris wrote:
> Hi, =20
>=20
> I have some problems with sqlstates returned from SQLGetDiagRec with=20
> psqlodbc. We use PostgreSQL with psqlodbc on Linux systems. =20
>=20
> We do at least some checks on sqlstates returned from PostgreSQL within=
=20
> our application to implement some specific error reactions. =20
>=20
> This worked fine with psqlodbc 08.01.0200 and PostgreSQL 8.1.9. We used=
=20
> to get a specific sqlstate and error message, e.g. =9322021=94, =93inva=
lid=20
> byte sequence for encoding…”. =20
>=20
> Now we changed to psqlodbc 08.02.0500 and PostgreSQL 8.2.5. In the very=
=20
> same error situation we still see the error message as before. The=20
> sqlstate obtained with SQLGetDiagRec however seems to be always =93HY00=

> (general error) in more or less any error situation.

I can see "22021" "invalid byte sequence ..." error message in a test
case.

Could you send me directly the Mylog message ?

regards,
Hiroshi Inoue

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate