Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing

Поиск
Список
Период
Сортировка
От Kristis Makris
Тема Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing
Дата
Msg-id 200108271618.f7RGIMf48924@postgresql.org
обсуждение исходный текст
Ответ на Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Ответы Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing  (Kristis Makris <kristis.makris@datasoft.com>)
Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing  (Kristis Makris <kristis.makris@datasoft.com>)
Список pgsql-odbc
Hi Hiroshi,


> > ******************************************************************************************
> > 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() ?
>
> Could you show me a reproducible example ?


I'm attaching two .sql files. Using psql, load the file "tables.sql" in
a fresh database. Then try to execute the commands in the "data.sql"
file. You should get the following error message:


test=# \i data.sql
BEGIN
psql:data.sql:2: ERROR:  <unnamed> referential integrity violation - key
in tableb still referenced from tablea
COMMIT


If you try to issue the commands included in the "data.sql" file through
ODBC using VC++ (instead of psql) you will run across the case where an
exception cannot be captured.

Thanks,
-Kristis


Вложения

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Cedar Cox
Дата:
Сообщение: RE: Access 2000 ODBC table links
Следующее
От: Kristis Makris
Дата:
Сообщение: Re: Error messages not always reported through the ODBCdriver -STATEMENT ERROR missing