Received: from cncware.whidbey.com (IDENT:root@cncware.whidbey.com [208.25.171.37]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA53382 for ; Mon, 16 Aug 1999 16:02:00 -0400 (EDT) (envelope-from ken@ori-ind.com) Received: from ken (ken.cncware.com [192.168.61.201]) by cncware.whidbey.com (8.8.7/8.8.7) with SMTP id NAA03094; Mon, 16 Aug 1999 13:00:12 -0700 Message-Id: <3.0.32.19990816130552.00a39980@ren.cncware.com> X-Sender: ken_ori@ren.cncware.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Mon, 16 Aug 1999 13:05:56 -0700 To: Byron Nikolaidis From: "Ken J. Wright" Subject: Re: catching posting exceptions Cc: pgsql-interfaces@postgreSQL.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 10:10 07/30/1999 -0400, you wrote: > > >"Ken J. Wright" wrote: > >> Attached are the logs pertaining to the posting error. Hopefully they will >> shed some light. At the end of sql.log there is a SQLDisconnect. This is >> the point in the program at which the dataset state goes to InActive. I can >> not as of yet, determine where the SQLDisconnect is originating. >> >> Byron, could you please have a look for a possible driver problem? >> > >I don't see anything. It looks like it is working correctly. The driver is >returning an error from sqlexecute. Shouldn't the application handle that? > Byron, The driver is returning a SQLSTATE of "08S01" (communication link failure) for any hstmt type error. The error in this case was from attempting to duplicate a unique key. My application never had the chance to judge the error, as the api (OCBDExpress) has a hard coded block that terminates the connection if the SQLSTATE is a "08xxx". This is where my problem stems from. I believe that both the api & the driver are not correct. The MS ODBC reference states that the SQLSTATE is not required by the driver and should not be trusted by an app. This is where I believe ODBCExpress is wrong. However, 08S01 indicates a rather fatal connection type of error. This is where I believe the driver is wrong. A failed sql statement does not constitute a connection failure. The closest error I can find that would work is HY000 (general error). Comments? Ken