SQLGetDiagRec, sqlstate returned?

From: "Heiser, Doris" <Doris(dot)Heiser(at)fujitsu-siemens(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: SQLGetDiagRec, sqlstate returned?
Date: 2008-02-08 16:02:52
Message-ID: 238C17DBF4050B40991C6D06B241D7D37E1ED9FC6E@ABGEX73E.FSC.NET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I have some problems with sqlstates returned from SQLGetDiagRec with psqlodbc. 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 sequence for encoding...".

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 "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 problem? Are we missing something in our application or is this normal behavior of the current driver version?

Thanks in advance and best regards,
Doris Heiser

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2008-02-08 17:24:32 Re: SQLGetDiagRec, sqlstate returned?
Previous Message Hiroshi Inoue 2008-02-07 00:09:35 Re: How to open more than 300 connections to postgres database.