I am adding cftry/cfcatch code to my application and I was wondering how to tell a form processing page to reload itself.
I have a query that gets max(id)+1 from a table and uses that value on an insert statement. Today I had 2 users submit their forms at the exact same moment (first time it's ever happened) and it caused one of the users to get a unique contraint error. What I would like to do is catch the unique contraint error and simply reload the processing page so that the max(id)+1 just gets the next value. I don't want to show anything to the user, just have it do what it was trying to do.
I tried using a meta tag with refresh but that kicked me out back to the form, which is different behavior than if I had clicked on the reload page button.
Thank you in advance for any advice!
I have a query that gets max(id)+1 from a table and uses that value on an insert statement. Today I had 2 users submit their forms at the exact same moment (first time it's ever happened) and it caused one of the users to get a unique contraint error. What I would like to do is catch the unique contraint error and simply reload the processing page so that the max(id)+1 just gets the next value. I don't want to show anything to the user, just have it do what it was trying to do.
I tried using a meta tag with refresh but that kicked me out back to the form, which is different behavior than if I had clicked on the reload page button.
Thank you in advance for any advice!