How to insert datas in form 6.0?
Date: Sun, 24 Oct 1999 18:27:07 GMT
Message-ID: <38134F80.D13FCF13_at_nokia.com>
Hi,
I am new to developer 6.0, and just learning it. I have a test database and I created one form for one of its tables.The table is the following:
COSTCENTERS (cc_id NUMBER 7, worksect_n VARCHAR2 (40))
cc_id is the primary key and worksect_n is mandatory. public synonim for the table is IM_COSTCENTERS;
I want to fill this table from a form. In this form I created a single record data block (with name costcenters) for these columns and a push button with ADD label. I also created a WHEN_BUTTON_PRESSED trigger with the following PL\SQL code:
declare
cc IM_COSTCENTERS.CC_ID%TYPE := :costcenters.CC_ID;
division IM_COSTCENTERS.WORKSECT_N%TYPE := :costcenters.WORKSECT_N;
begin
insert into IM_COSTCENTERS values (cc,division);
commit;
end;
As soon as I push the button I got the following error message:
FRM-40508: ORACLE error: unable to INSERT record
Without commit it is working fine, but at the end I cannot save the
result to the database. I have all the rights to do the insert, because
when I change the cc variable in the insert line to a constant value it
works fine.
Can someone help what do I wrong??????????????
Thanks
Istvan Hegedus Received on Sun Oct 24 1999 - 20:27:07 CEST