pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQLGetDiagRec, sqlstate returned?
2+ messages / 2 participants
[nested] [flat]

* SQLGetDiagRec, sqlstate returned?
@ 2008-02-08 16:02  Heiser, Doris <Doris.Heiser@fujitsu-siemens.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Heiser, Doris @ 2008-02-08 16:02 UTC (permalink / raw)
  To: 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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: SQLGetDiagRec, sqlstate returned?
@ 2008-02-08 17:24  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Heiser, Doris <Doris.Heiser@fujitsu-siemens.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Hiroshi Inoue @ 2008-02-08 17:24 UTC (permalink / raw)
  To: Heiser, Doris <Doris.Heiser@fujitsu-siemens.com>; +Cc: pgsql-odbc

Heiser, Doris wrote:
> 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 can see "22021" "invalid byte sequence ..." error message in a test
  case.

Could you send me directly the Mylog message ?

regards,
Hiroshi Inoue



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-02-08 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-08 16:02 SQLGetDiagRec, sqlstate returned? Heiser, Doris <Doris.Heiser@fujitsu-siemens.com>
2008-02-08 17:24 ` Hiroshi Inoue <inoue@tpf.co.jp>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox