Form Update [message #324529] |
Mon, 02 June 2008 23:45  |
rakhatmis
Messages: 25 Registered: March 2008
|
Junior Member |
|
|
Hi all
I am new in this world of forms. I am using forms 6i. I have a form where I am working on some DMLs.
When I enter data in text items and press save button, all the records inserted successfully. On save button there is commit_form on When_Button_Pressed trigger.
The problem is when I open the same form, search for a specific record, do modifications and press save it insert a new row in the table instead of updating the same record.
I want to update the searched record instead of inserting a new one.
Kindly help me asap
Thanking you in advance.
|
|
|
Re: Form Update [message #324550 is a reply to message #324529] |
Tue, 03 June 2008 01:58   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Quote: | I open the same form, search for a specific record, do modifications and press save it insert a new row in the table instead of updating the same record
|
If you've created a form using Data Block Wizard and changed NOTHING in between, this behaviour is NOT expected.
Query ("search for a specific record") will display information gathered from a database. "Modifications" of the existing record are considered as UPDATE, so - "save" will NOT INSERT a new record into a table, but UPDATE existing one.
Unless, of course, you did "something" that changed this expected, default behaviour. It might be a trigger, so - did you write any trigger? Which one? How does it look like?
|
|
|
Re: Form Update [message #324577 is a reply to message #324550] |
Tue, 03 June 2008 03:40   |
rakhatmis
Messages: 25 Registered: March 2008
|
Junior Member |
|
|
thanx for a quick reply
yes i have created the form using form wizard but what changes should i make.
under When_button_pressed triger of save button i have simply written commit_form;
kindly guide me regarding this problem
thanking you in advance
|
|
|
|
|
|
Re: Form Update [message #335595 is a reply to message #335382] |
Tue, 22 July 2008 21:48  |
rakhatmis
Messages: 25 Registered: March 2008
|
Junior Member |
|
|
i have solved my problem to some extent.
now i am not searching a specific record through search button instead i go to the desired record by using the next button which forms 6i provide in .fmx
but obviuosly this is not a good solution its just a way to not to stuck.
|
|
|