No we already have something in the place that checks for a duplicate.
The problem was it was caching the results of both the search for the
random number and then inserting it. I tried the CFLocation technique
as described in an earlier post but it still seems to be entering in
duplicate values. I have a few other ideas Im gonna try and hopefully
get this fixed.
Thanks for everyones help that has responded to me here and privately.
Misty
-----Original Message-----
From: mrodosky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 10:12 AM
To: cf-talk
Cc: mrodosky
Subject: RE: duplicating inserts
One way is to add a hidden field which is a random number to the the
form.
Add this to the database table as well when doing the insert. Your
action
page should start with a check for the existance of the random number in
the
db, if it exists then you have a resubmit going on and you just override
it.
hth
Matt
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 8:25 AM
To: CF-Talk
Subject: duplicating inserts
Anyone know of a way to stop records from being reinserted into a
database when a user hits the back button? I have a page that checks
for duplications in a database, and if it finds no duplicate, then it
will insert it into the database. Problem is, when a user hits the back
button, it inserts the record again. Its not finding duplicates more
than likey because the query is being cached so it doesnt know to look
again. But how can I get it to either do nothing including not
inserting the record a second time or atleast recheck again to see if
its a duplicate record? I can't take caching off this machine as these
are some monster queries and performance is greatly improved by caching
queries.
Thanks
***********************************
Misty Woodward
ODS Decision Support
tel: 913.315.6583
email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists