Stopping forms message Do you want to save the changes...? [message #501071] |
Fri, 25 March 2011 10:14 |
|
Vachaun22
Messages: 10 Registered: March 2011
|
Junior Member |
|
|
First, I need to emphasize that I am in no way an Oracle forms developer, this project is for a college course. I'm a C++ programmer by training.
I have a form that I am laying out with a search button, add button, update button, execute button along with a few text boxes that are derived from a database table.
The search button simply clears the form, enables the text box controls for editing, disables all buttons except the execute, and sets a form variable to flag the form is in search mode (add/update work very similarly).
My issue, is since I am clearing the text box controls at run-time, the form believes I have made a change. Now when I click the execute button to issue the commands, I get a message box asking if I would like to save the changes.
This is very troublesome, as no changes have been made, as far as the user is concerned, so they should not see this box.
I have thought about making the form a custom form, but how would I do a generic search where I can step through the records like I can with a form derived directly from a table? Also, I'm not sure that would even make a difference as to whether the message is shown or not.
For someone who programs in an environment where I am in control of most things, this seems counter intuitive, almost to the point of being prohibitive in functionality. Is there a way I can avoid the form wanting to cause a form commit?
Thanks.
--- EDIT ---
I believe I have this solved.
I stopped clearing the controls, and after setting the enabled state as desired and setting the focus to the correct control, I then used the ENTER_QUERY; statement. This seemed to have corrected the issue.
[Updated on: Fri, 25 March 2011 10:19] Report message to a moderator
|
|
|
Re: Stopping forms message Do you want to save the changes...? [message #501083 is a reply to message #501071] |
Fri, 25 March 2011 12:34 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As you are new to Oracle Forms, I don't know whether you no that - if you create an initial form using the Data Block Wizard - you'll get a form that is capable of performing ALL basic tasks. It includes: inserting new records, querying existing ones, updating fetched values and, finally, deleting records from a table. Forms built-in querying mechanism is quite powerful and, if you know how to properly use it, lets you perform all kinds of searches.
Of course, that initial version mostly requires additional programming, but most things you'd have to program manually are already done.
Reading what you've said, I have a feeling that you, actually, put effort into something that could have been done much easier (following the Wizard). All those "search button, add button, update button, execute button" are there in default Forms toolbar. Maybe I'm wrong, but I think that you'd benefit if you could find Forms manual and read it. It might save you some time and a lot of effort.
|
|
|
|
|