Home » Developer & Programmer » Forms » Removing duplicates from forms
Removing duplicates from forms [message #78635] Wed, 06 March 2002 06:12 Go to next message
neel
Messages: 12
Registered: November 2001
Junior Member
I want to remove duplicate item # after commiting the records thru forms. After issuing a commit_form i am
using a forms_ddl statement for deleting.
i.e forms_ddl('delete from table t1
where rowid < (select max(rowid) from table t2
where t1.col1 = t2.col1)')
But the form is hanged up and when i do an alt-ctrl i see that the form is not responding. Please let me know
how to do it.

Thanks
Re: Removing duplicates from forms [message #78636 is a reply to message #78635] Wed, 06 March 2002 06:21 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
1. Why u r inserting the duplicate data , in the first place ?u can avoid that , by putting some validation.
2.why u r using forms_ddl when u could have fired that statement without it.
3.when u commit the form , then changes are made to the database and form make sure the database state andf form state are same, at this pint of time.

after that when u delete data directly , then form state is not same as the database state .which is causing the problem.

workaround is to, delete the data and clear the block/form and execute_query.

better u change ur approach and put some validation and stop user from entering duplicate data (which is waste of time for the user)

hope it helps!!!
Previous Topic: I have tried that , it works for some, but when ......
Next Topic: Re: Removing duplicates from forms
Goto Forum:
  


Current Time: Thu Mar 28 18:08:01 CDT 2024