Home » Developer & Programmer » Forms » Which trigger to use
Which trigger to use [message #86981] Thu, 25 November 2004 23:22 Go to next message
Raga
Messages: 8
Registered: November 2004
Junior Member
I have created a base table block using a View. My requirement is to allow modification in two columns (i have written code to copy the values to two other columns which are displayed in the canvas - i have not displayed the original base view columns).

I can be able to modify the values, I have a button to commit the changes (want to update in the original table for the values changed in the view).

But while issuing commit_form, I am getting message "No Changes to save" since the original columns of view are not modified.

But I need to keep track of the modified records and to update values in the base table. I have tried in Post_commit and in others.

Can any one came across this situation ?

Raga

 
Re: Which trigger to use [message #86982 is a reply to message #86981] Fri, 26 November 2004 05:16 Go to previous messageGo to next message
aditya gangadharam
Messages: 15
Registered: September 2004
Junior Member
hi raga,
just keep the database columns in the canvas i mean to say that dont try with the view directly try with the data base you will get the same output(i.e. no changes to save. I am saying this because i too got the same problem but i am supressing the error by keeping the :System.Message_Level := 5 before commit and :System.Message_Level := 0 after the commit. even though the error raises the table is updated or new record is inserted.
bye
take care.
adi
Re: Which trigger to use [message #87000 is a reply to message #86982] Sun, 28 November 2004 08:02 Go to previous message
Just John
Messages: 69
Registered: November 2004
Member
I would avoid messing with the :system.error_level - you should rearly need to alter it....

The problem is (as you said) that you are not actually updating a database item, but just a display item, so when forms issues a commit, it has not changes to save (which is correct!) if you are adding code into the ON_COMMIT to handle the save, fine - but that is where the error is comming from!....

If you just delete the 'copy' items (I don't think you don't need them!) and use just the database items, setting the non-updatable items to non-updatable this should solve ALL your issues and meet the requirements.

This will also let you use Forms standard functionality so you don't need to handle saving via a button.

If you need to keep track of database changes (in the form) then this should be your nondatabase item.

As previously mentioned unless you need a view, don't use one - it may slow things down and is just another database object to look after.
Previous Topic: Re : challange
Next Topic: key commit problem
Goto Forum:
  


Current Time: Sat Sep 07 15:58:48 CDT 2024