Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing
От | Kristis Makris |
---|---|
Тема | Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing |
Дата | |
Msg-id | 200108241645.f7OGjNf32920@postgresql.org обсуждение исходный текст |
Ответ на | Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing (Hiroshi Inoue <Inoue@tpf.co.jp>) |
Список | 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 по дате отправления: