Knowledge Base Article #155 - Error : Cannot Insert NULL into ("PB"."GROUPS"."GROUP_ID")
DateAug 6, 2007
ByRoss P
Filed UnderPowerBase
ClassGeneral
 
Issue Addressed
When trying to add new user groups to PowerBase, the error message "Cannot Insert NULL int ("PB"."GROUPS"."GROUP_ID")" is displayed and the new user group will not save.
 
Causes of Issue
This issue may appear for PowerBase customers using the Oracle platform. This is due to a missing trigger in certian versions of the PowerBase database structure.
 
Solution to this Issue
The following script needs to be run on the database as user PB.

CREATE OR REPLACE TRIGGER SET_GROUP_ID BEFORE INSERT ON PB.GROUPS FOR EACH ROW BEGIN SELECT PB.GROUP_ID_GEN.NEXTVAL INTO :new.GROUP_ID
FROM dual;
End SET_GROUP_ID;


The sequence GROUP_ID_GEN should already be in the database, but if it is not�

CREATE SEQUENCE PB.GROUP_ID_GEN
START WITH 450
MAXVALUE 1999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
 
Other Comments
Users that are missing this trigger may be missing another. Please refer to this article.

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]