Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > dupe records on refresh

Reply
Thread Tools

dupe records on refresh

 
 
2obvious
Guest
Posts: n/a
 
      02-11-2005
Despite my best efforts, I cannot prevent bogus duplicate records in my
database. I have a routine that compares against similarities,
presenting an alert page with examples when there is a regular
expression match. It works brilliantly.

Get beyond this page, however, and anytime one submits, goes back in
history, and submits again, there is a duplicate. (Questioning why
someone would do this will not solve my problems--I'm just trying to
make things bulletproof.)

I can only think of two methods to solve my problem, neither of which
seems practical. I was hoping for some outside insight.

Method 1: kill the browser history, making it impossible for my users
to go back and resubmit. Due to security issues, the only way I know
of pulling this off is indirect and annoying: a pop-up.

Method 2: check every field of every record for an identical match each
time. This would probably slow the server to a crawl.

I'm using hidden form fields to pass data, if it helps. But I'm
storing them in a globally-used server side include. I did a brief
experiment with saving to a session variable and got the same results.
But I don't have any experience with session variables, so perhaps I
didn't try hard enough?

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      02-11-2005
2obvious wrote:
> Despite my best efforts, I cannot prevent bogus duplicate records in
> my database. I


Preventing duplicates is what your database's primary key and/or unique
index is for. It is folly to attempt to use application code to do your
database's job. Your database should be designed to protect your data's
integrity. Given that you're telling us that duplicates are being allowed, I
can pretty much guarantee that your database design is flawed.

Post some details and maybe somebody will have some suggestions.


Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Dupe in a List Larry Bud ASP .Net 4 07-31-2007 08:36 PM
Firefox (mybe a dupe) MrMagoo Computer Support 2 12-19-2005 11:54 PM
*HELP* please: how to dupe STDIN in an IO::Scalar? J Krugman Perl Misc 1 11-25-2004 01:53 AM
Finding new / dupe files on large file system Anonymous Coward Computer Support 2 09-25-2004 05:19 AM
match muliple header records to associated detail records Luke Airig XML 0 12-31-2003 12:06 AM



Advertisments