Home » Developer & Programmer » Forms » Post change trigger (two threads merged)
Post change trigger (two threads merged) [message #173943] Thu, 25 May 2006 05:50 Go to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
Am facing problem when i add a post change trigger to my edit customer details form i get an error when trying to edit the customer records and a message appears saying that unable to save records, however the edit button works fine when i remove the post change trigger.??

what is the problem ?
cant i use the post change trigger with the edit button?!
Re: Edit button does not work with post change trigger [message #174211 is a reply to message #173943] Fri, 26 May 2006 08:46 Go to previous messageGo to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
any help?! any idea?!
What is the problem with this form...here is what i have [message #174264 is a reply to message #173943] Sat, 27 May 2006 00:23 Go to previous messageGo to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
i have a edit user form where it contains user name (it is primary key), user type and password.
i have added a post change trigger to the user name, so when i type the user name it show me the other details of the user.

when i execute the query and make changes in the records and want to save it, it save it and update it without any errors,

but when i show the records of the user by using the post change trigger and then when i update his record and want to save it it gives me an error says
FRM-40508: ORACLE error :unable to insert record.

and also this error says
ORA-00001: unique constraint (S200207680.USE_1_PK) violated


please any help?!
Re: What is the problem with this form...here is what i have [message #174272 is a reply to message #174264] Sat, 27 May 2006 02:40 Go to previous messageGo to next message
aciolac
Messages: 242
Registered: February 2006
Senior Member
This error means that You try to update username by one that already exist in database. Verify what by username you update the record.
Re: Edit button does not work with post change trigger [message #174276 is a reply to message #174211] Sat, 27 May 2006 02:47 Go to previous messageGo to next message
jowahl
Messages: 82
Registered: May 2006
Member
what does the post-change-trigger do?
Re: What is the problem with this form...here is what i have [message #174516 is a reply to message #174264] Mon, 29 May 2006 07:45 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What version of forms are you using? The Post Change trigger has been superceded in later versions of forms and should be replaced by When-Validate-Item.

You appear to be palcing data into an empty record and the form is trying to save it. You probably need to be in 'Enter Query' mode before placing the data in the field and doing your 'Execute Query'.

David
Re: What is the problem with this form...here is what i have [message #174520 is a reply to message #174516] Mon, 29 May 2006 07:53 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please don't start new threads for the same issue.

Please post the code that you currently have in your trigger.

David
Re: Post change trigger (two threads merged) [message #174551 is a reply to message #173943] Mon, 29 May 2006 09:15 Go to previous messageGo to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
i am using form builder 9i
i have tried using the when validate item but still the same problem
here is my code>
Begin
     select JOB_NAME, EMP_STATUS,PAY_CARD_NO,CARD_ISSUE_DATE,CONTRACT_END_DATE,CARD_EXPIRY_DATE,
     REMARKS, CONTRACT_START_DATE,SALARY,PEO_PER_CODE,COM_COM_CODE
     Into :MOL_EMPLOYEESES.JOB_NAME, :MOL_EMPLOYEESES.EMP_STATUS,
     :MOL_EMPLOYEESES.PAY_CARD_NO ,:MOL_EMPLOYEESES.CARD_ISSUE_DATE,:MOL_EMPLOYEESES.CONTRACT_END_DATE,
     :MOL_EMPLOYEESES.CARD_EXPIRY_DATE,
     :MOL_EMPLOYEESES.REMARKS, :MOL_EMPLOYEESES.CONTRACT_START_DATE, :MOL_EMPLOYEESES.SALARY,
     :MOL_EMPLOYEESES.PEO_PER_CODE, :MOL_EMPLOYEESES.COM_COM_CODE  
from MOL_EMPLOYEESES
where MOL_EMPLOYEESES.CARD_NO = :MOL_EMPLOYEESES.CARD_NO;
     select PER_NAME
     Into :MOL_EMPLOYEESES.PER_NAME 
from MOL_PEOPLES
where MOL_PEOPLES.PER_CODE = :MOL_EMPLOYEESES.PEO_PER_CODE;
    select COM_NAME
     Into :MOL_EMPLOYEESES.COM_NAME
from MOL_COMPANIESES
where MOL_COMPANIESES.COM_CODE = :MOL_EMPLOYEESES.COM_COM_CODE;

End;


please help me?!
Re: Post change trigger (two threads merged) [message #174761 is a reply to message #174551] Tue, 30 May 2006 08:35 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
And against which item do you have this trigger?

David
Previous Topic: problem in set_item_property
Next Topic: how to manipulate tree nodes
Goto Forum:
  


Current Time: Fri Sep 20 06:30:18 CDT 2024