oracle6/NeXT DBKit problem with db:notificationFrom:::

From: Mike Bray <mrb_at_earth.wustl.edu>
Date: Wed, 14 Oct 1992 02:06:53 GMT
Message-ID: <1992Oct14.020653.7667_at_wuecl.wustl.edu>


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_at_earth.wustl.edu Received on Wed Oct 14 1992 - 03:06:53 CET

Original text of this message