Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing - Mailing list pgsql-odbc

From Kristis Makris
Subject Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing
Date
Msg-id 200108241645.f7OGjNf32920@postgresql.org
Whole thread Raw
In response to Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List pgsql-odbc
Hello Again,

> > conn=33461048, query='BEGIN'
> > conn=33461048, query='SELECT Vendor_Remove(1)'
> >     [ fetched 1 rows ]
> > conn=33461048, query='COMMIT'
> > ERROR from backend during send_query: 'ERROR:  <unnamed> referential
> > integrity violation - key in vendor still referenced from
> > vendorforwellagreement'
> > CONN ERROR: func=SQLTransact, desc='', errnum=110, errmsg='ERROR:
>
> The error seems to have occured at SQLTransact().
> Probbably you should catch the error at CommitTrans() not at
> ExecuteSQL().
>

I've also tried the following from the psql command-line client:

******************************************************************************************
wats=# begin;
BEGIN
wats=# select vendor_remove(1);
ERROR:  <unnamed> referential integrity violation - key in vendor still
referenced from vendorforwellagreement
wats=# commit;
COMMIT
******************************************************************************************

psql reports the error when I issue the SELECT statement, not when I
issue the commit. Shouldn't I be able to capture an exception when I do
an ExecuteSQL() from VC++, instead of a CommitTrans() ?

Thanks,
-Kristis

---------------------------------------------------------------------
Kristis Makris                          Datasoft Corporation
kristis.makris@datasoft.com             http://www.datasoft.com
---------------------------------------------------------------------


pgsql-odbc by date:

Previous
From: Kristis Makris
Date:
Subject: Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: ODBC include files