Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing - Mailing list pgsql-odbc
From | Hiroshi Inoue |
---|---|
Subject | Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing |
Date | |
Msg-id | 3B85FB6A.25BF322E@tpf.co.jp Whole thread Raw |
In response to | Error messages not always reported through the ODBC driver - STATEMENT ERROR missing (Kristis Makris <kristis.makris@datasoft.com>) |
Responses |
Re: Error messages not always reported through the ODBC
driver -STATEMENT ERROR missing
Re: Error messages not always reported through the ODBC driver -STATEMENT ERROR missing |
List | pgsql-odbc |
Hi Kristis, Kristis Makris wrote: > > Hello everyone, > > I'm experiencing a problem receiving error messages correctly from > postgres. I'm running PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by > GCC egcs-2.91.66, using the 7.01.00.06 ODBC driver through VC++. In > particular, I'm receiving a CONN ERROR but no STATEMENT ERROR, with the > effect of not being able to capture an exception for it, since no > exception is raised at all. > > The error message results from constraints placed on backend tables > during table definition that forbid removing a tuple from one table if > that tuple is referenced from a different tuple in another table > (using the ON DELETE RESTRICT clause). Here's the definition of the > table from which a tuple is attempted to be removed: > > create table Vendor ( > ID int primary key > references ContactInfo (ID) > on update cascade > on delete restrict, > VendorNumber text > ); > > Here's is a copy of the log message: > > ************************************************************************************ > conn=33461048, SQLDriverConnect( in)='DSN=wats;UID=cathy;PWD=cathy;', > fDriverCompletion=0 > DSN info: > DSN='wats',server='mayhem',port='5712',dbase='wats',user='cathy',passwd='cathy' > onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' > conn_settings='' > translation_dll='',translation_option='' > Global Options: Version='07.01.0005', fetch=100, socket=4096, > unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 > disable_optimizer=1, ksqo=1, unique_index=0, > use_declarefetch=0 > text_as_longvarchar=1, unknowns_as_longvarchar=1, > bools_as_char=0 > extra_systable_prefixes='dd_;', conn_settings='' > conn=33461048, query=' ' > conn=33461048, query='set DateStyle to 'ISO'' > conn=33461048, query='set geqo to 'OFF'' > conn=33461048, query='set ksqo to 'ON'' > conn=33461048, query='select oid from pg_type where typname='lo'' > [ fetched 0 rows ] > conn=33461048, query='select version()' > [ fetched 1 rows ] > [ PostgreSQL version string = 'PostgreSQL 7.1.2 on > i686-pc-linux-gnu, compiled by GCC egcs-2.91.66' ] > [ PostgreSQL version number = '7.1' ] > conn=33461048, > SQLDriverConnect(out)='DSN=wats;DATABASE=wats;SERVER=mayhem;PORT=5712;UID=cathy;PWD=cathy;READONLY=0;PROTOCOL=6.4;FAKEOIDINDEX=0;SHOWOIDCOLUMN=0;ROWVERSIONING=0;SHOWSYSTEMTABLES=0;CONNSETTINGS=' > 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(). > > Incidentally, I have a couple more questions about the driver in > general: > > 1) I've noticed that the 7.01.00.06 driver reports in the logs that it > is a 7.01.0005 driver. Is this nomral? Is this a known bug? > > "Global Options: Version='07.01.0005'" Hmm strange, what does Control Panel show ? regards, Hiroshi Inoue
pgsql-odbc by date: