Friday, March 9, 2012

multiple submit

Is there a way to stop duplicate entries into a database from people double clicking the submit button?1. Beat them about the head and shoulders every time you catch them double clicking.

2. Put a unique index on the key column(s).

3. Add a trigger to prohibit inserting duplicate rows. Don't forget to have a nasty message!

4. Only allow modifications via stored procedures. By using a stored procedure you can do cool things like link to the payroll system and transfer $3.00 from their paycheck to yours everytime the double click.

5. Re-write your application so double clicks won't be a problem.|||I just posted a reply to a similar message. It was as general as, but as not witty as, Paul's response. I recomended solving it on the web side.

No comments:

Post a Comment