Article View: comp.sys.next.programmer
Article #1471oracle/dbkit - problem with db:notificationFrom
From: Mike Bray
Date: Wed, 14 Oct 1992 01:52
Date: Wed, 14 Oct 1992 01:52
36 lines
2164 bytes
2164 bytes
I'm looking for information about the error code returned by DBDatabase's delegate "db:notificationFrom:message:code:". I have a test database running under oracle 6.0.30.3.1 under NextStep 3.0. It has 3 columns, (firstname char(20), lastname char(20), key number not null), and a unique index on column "key". I have three text windows to see the results of database operations that the DBDatabase object makes available through it's delegates, db:log:, db:notificatioFrom:message:code:, and db:willEvaluateString:usingBinder:. Everything works great, but there's an inconsistency in the "code" variable returned by db:notificationFrom:message:code:. If I attempt to insert a row of nulls into the database, db:notificationFrom shows (among other things): "notification:(code -1400) Can't execute oracle cursor. ORA-01400:mandatory (NOT NULL) column is missing or NULL during insert" This seems reasonable. Other tests return reasonable codes, always with the "code" variable matching the "ORA-xxxxx" message. However, attempting to insert a row with a duplicate key value returns two different values. The oracle error message is "ORA-00001", duplicate key in index, which is correct, but code comes through as -9. What's going on? If the error code is not what Oracle returns, where is the definition of these codes? I called Oracle Tech support, and they tell me that -9 is the code that Oracle Version 2 used for this condition. This code is still available in version 6 OCI libraries, for backwards compatibility. Is it possible that this variable is being used by mistake in the Oracle DBKit adaptor? Thanks, Mike Bray mrb@earth.wustl.edu
Technical Details
Message-ID:
<1992Oct14.015207.7587@wuecl.wustl.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!darwin.sura.net!wupost!eclnews!usenetShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!spool.mu.edu!darwin.sura.net!wupost!eclnews!usenet From: mrb@earth.wustl.edu (Mike Bray) Subject: oracle/dbkit - problem with db:notificationFrom Message-ID: <1992Oct14.015207.7587@wuecl.wustl.edu> Sender: usenet@wuecl.wustl.edu (Usenet Administrator) Nntp-Posting-Host: earth Organization: Washington University, St. Louis MO Date: Wed, 14 Oct 1992 01:52:07 GMT Lines: 36