Knowledge Base Article #156 - Error - Cannot Insert NULL into ("PB"."[RELAY SETTINGS TABLE]"."[SETTING FIELD]")
DateAug 7, 2007
ByRoss P
Filed UnderRTS General
ClassGeneral
 
Issue Addressed
When trying to save a settings record for a relay in an Oracle based system, the following error appears: "Cannot Insert NULL into ("PB"."[RELAY SETTINGS TABLE]"."[SETTING FIELD]")"
 
Causes of Issue
This issue sprang up when we converted our default Sybase database to the Oracle format. Some fields in some of the relay settings tables were incorrectly assinged the "NOT NULL" constraint, and some were incorrectly given the "primary key" status.

The following tables and fields are known to suffer from this condition:

RELAY_GEN_87T
----------------------------
COMMENTS

RELAY_SEL_2PG10
----------------------------
S_AUTO

RELAY_SEL_311
----------------------------
P1_PREFIX
P1_ADDR
P1_RTSCTS
P1_FASTOP

RELAY_SEL_351
----------------------------
S81D2P

RELAY_SEL_387
----------------------------
ALIAS20
 
Solution to this Issue
The "NOT NULL" and "Primary Key" statuses assigned to the fields in these relay tables will need to be removed.

The fields NID, RLID, and SETTINGS_STATUS are the only fields that should be labeled "NOT NULL". All other fields should accept NULL values and there are no primary keys on these tables by default. If there is a primary key assigned, it should be in the NID column.

The following scripts fix the known tables that this applies to.

ALTER TABLE PB.RELAY_SEL_387L
MODIFY
(
COMMENTS LONG NULL,
);

ALTER TABLE PB.RELAY_GEN_87T
MODIFY
(
COMMENTS LONG NULL,
);

ALTER TABLE PB.RELAY_SEL_587_Z DROP PRIMARY KEY;

ALTER TABLE PB.RELAY_SEL_351
MODIFY
(
S81D2P VARCHAR2(5 BYTE) NULL
);

ALTER TABLE PB.RELAY_SEL_387 DROP PRIMARY KEY;

ALTER TABLE PB.RELAY_SEL_387
MODIFY
(
ALIAS20 VARCHAR2(15 BYTE) NULL
);

ALTER TABLE PB.RELAY_SEL_351 DROP PRIMARY KEY;

ALTER TABLE PB.RELAY_SEL_351
MODIFY
(
S81D2P VARCHAR2(5 BYTE) NULL,
);


ALTER TABLE PB.RELAY_SEL_311 DROP PRIMARY KEY;

ALTER TABLE PB.RELAY_SEL_311
MODIFY
(
P1_PREFIX VARCHAR2(1 BYTE) NULL,
P1_ADDR NUMBER(2) NULL,
P1_RTSCTS VARCHAR2(1 BYTE) NULL,
P1_FASTOP VARCHAR2(1 BYTE) NULL
);

ALTER TABLE PB.RELAY_SEL_2PG10
MODIFY
(
S_AUTO NUMBER(1) NULL
);

Login to Support
Email:
Password:
Contact Support to reset your password

Support Links
Support Main
Register for Support
Knowledge Base

Contact Support
Phone:
(918) 622-4530
. . . . . . . . . . . . . . . . .
Email:
[email protected]