Hi,
I use TOraQuery to insert data into the database and I use TDBEdit to allow the user to insert data. In my OraQuery's SQLInsert, I have write the following:
INSERT INTO tprofile
(PF_PROFILE_ID, PF_ENG_NAME, PF_REGION, PF_CRE_DATE, PF_CRE_UID, PF_UPD_DATE, PF_UPD_UID)
VALUES
(QPROFILE.NEXTVAL, :PF_ENG_NAME, :PF_REGION, SYSDATE, :PF_CRE_UID, SYSDATE, :PF_UPD_UID)
Where PF_PROFILE_ID, PF_REGION, PF_CRE_UID and PF_UPD_UID cannot be NULL in the database.
If the use input all the values, it works fine. But if the user, say didn't input the PF_ENG_NAME, then it got the error: ORA-01400: cannot insert NULL into PF_REGION. But the only field that the user didn't input is PF_ENG_NAME which is a field allowed to be NULL. Can you help me to solve the problem, thanks.