I am having a very strange problem. I am trying to save an oracle 9i form on the click of a button. The code written on the when-button-pressed (Save button) trigger is commit_form;. I do not have anyother commit statement in my form. I get this message "No changes to apply" when ever i select the Save option. But the changes i have made is actually saved. I have verified it but, i am not able to understand as to y i am getting this error when it is performing the commit.
The application server is running on windows 2000 server and the database is on the same.
Would appreciate if someone could enlighten me on this
Is the blocks in the form have base tables or you mannually give all DML statements in the commit trigger. If the blocks are not base table the FORM_STATUS will not get set to "CHANGED" When the FORM_STATUS is "NEW" this message comes. It is not an error but a message. And alo try to find whether there are 2 commit_form commands happaning internally throught other triggers that fires when commit_form is issued. As an advice I would say that rather than saying commit_form it's better to issue DO_KEY("COMMIT_FORM")
Thanks for the advice, i have implemented it (Could you please explain as to y it is a good idea to use the Do_key and not the actual commit). This work fine when i run the form locally on my system (oracle 9imon Win 200 professional). But i get these message when i try to run the forms on the server (Win 2000 server).
The blocks in my form contain the base tables. I have 2 blocks in the form one is a control block and the other is from the table. I have commit only once in the form. The other triggers in form are clear and exit. I am still getting this message. I have checked all the items in the block none of them have another commit statement in them.
The committing of the form involves triggering of a lot of triggers in the form. These include all validation triggers, PRE, ON and POST triggers of INSERT, UPDATE AND DELETE, and ON_COMMIT.
Generally this commit starts by firing KEY_COMMIT trigger first. But if you say commit_form this trigger will not get fired. If you have written some code in KEY_COMMIT which you need to get run when the form commits this will not happen when commit_form is issued. So it is always advied to use the inbuilt key commannd as far as possible.
This is generally a god practice when you code complex forms.