Home » Developer & Programmer » Forms » problem in trigget (forms,6i,xp)
problem in trigget [message #414941] Fri, 24 July 2009 02:01 Go to next message
simcky
Messages: 38
Registered: July 2009
Member
hi
i had problem smilar to the previous problem of mine but this
tme i had a form with three blocks based on the same table that is described below:-
Describing prmamed....
NAME Null? Type
------------------------------- --------- -----
EMPNO NOT NULL VARCHAR2(8)
EARNINGDEDUCTION NOT NULL VARCHAR2(5)
PAYPERIOD NOT NULL VARCHAR2(6)
REFNO NOT NULL VARCHAR2(15)
REFDATE DATE
AMT NUMBER(5,0)
PAYCALPERIOD VARCHAR2(6)
BILLNO VARCHAR2(8)
CHANGEDATE DATE
USERID VARCHAR2(30)

in first block i have item's
empno,earningdeduction,displayitem1,displayitem2
and i had set the database item property to No for all of these items

to populate the empno,displayitem1 i had created the lov using the record grp query
select empno,empname from emp

to populate the earningdeduction and displayitem2 i had created another lov using the record grp query
select distinct earningdeduction,shortdesc from eed;

in second block i have the items:-
empno,payperiod,refno,amt,refdate,paycalperiod
and to populate all these items i m writting a trigger to fetch data from the database

in third block i have the items:-
empno,payperiod,refno,amt
and i want that data get saved to database from 1st and the 3rd block
i had made a mster-detail-relationship:-
1st block is the master block
3rd block is detailed block
Now when i m writting the in built function on a push button to save the data as:-
if :system.form_status='CHANGED'
then commit_form;
end if;

Now, when i m pressing this button then i m getting the same error againg i.e
FRM-40508:ORACLE error unable to insert record.
and when i m pressing shift+f1 then i m getting the database error as
sql statement in error:
INSERT INTO PRMAMED(EMPNO,PAYPERIOD,REFNO,AMT,REFDATE,PAYCALPERIOD) VALUES (:1,:2,:3,:4,:5,:6)
error:
ORA-01400: cannot insert NULL into ("NAV"."PRMAMED"."EARNINGDEDUCTION")
where NAV is my database name
and i m giving the value of earningdeduction from 1st block
could someone please help me out to remove this problem
thanks :x

[Updated on: Fri, 24 July 2009 02:06]

Report message to a moderator

Re: problem in trigget [message #414947 is a reply to message #414941] Fri, 24 July 2009 02:14 Go to previous messageGo to next message
blaxmi
Messages: 36
Registered: May 2008
Location: Hyderabad
Member
Hi

Are you passing the values to all the variables?
If not please check the notnull varialbles. B'cos in the table structure you have mentioned not null condition for some of the variable which are mandatory. so check those variables data and let me know if you still face any problem.
Re: problem in trigget [message #414950 is a reply to message #414947] Fri, 24 July 2009 02:17 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
hii blaxmi
yaa i m passing the value's to all of the variable's
Re: problem in trigget [message #414951 is a reply to message #414941] Fri, 24 July 2009 02:19 Go to previous messageGo to next message
blaxmi
Messages: 36
Registered: May 2008
Location: Hyderabad
Member
Ok if that is the case check the database item property in all the fields.
Re: problem in trigget [message #414954 is a reply to message #414951] Fri, 24 July 2009 02:25 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
i had already checked the database property of every item but i m unable to get the problem
Re: problem in trigget [message #414955 is a reply to message #414941] Fri, 24 July 2009 02:30 Go to previous messageGo to next message
blaxmi
Messages: 36
Registered: May 2008
Location: Hyderabad
Member
Ok in the first message u said that, the empno set as display item. it cannot be a display item. Make the item type as text-item for all the database fields where you have put as display item.

I hope for display type item the records will not get saved.
Re: problem in trigget [message #414956 is a reply to message #414955] Fri, 24 July 2009 02:34 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
No dear i said that i had set the database item property of empno and all other items of first block to no.empno is a text item not a display item
Re: problem in trigget [message #415022 is a reply to message #414941] Fri, 24 July 2009 07:37 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
You really are making things complicated for yourself.

Block1 might contain an item for EARNINGDEDUCTION but it's not that block that's doing the insert.
Block3 is doing the insert and it doesn't contain an item for that column so can't supply a value for the insert statement.

Every column that needs to be inserted needs to be in the block that's doing the insert.

And do you really need 3 blocks?
Previous Topic: moving objects
Next Topic: record group with concatination
Goto Forum:
  


Current Time: Fri Sep 20 09:51:24 CDT 2024