473,594 Members | 3,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dupe records on refresh

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?

Jul 22 '05 #1
1 1231
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"
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5452
by: entoone | last post by:
I have an html form, that has fields and when the submit button is pressed, the information is transferred to a php file. Which then inserts the data into my sql database. How can I go about ensuring that someone isn't able to submit thier information twice, or to somehow have the database checked before inserting the information, to see if it's there already. I have some duplicates happening and would like to stop it.
0
2347
by: Paul | last post by:
This is the currernt table strucure PHP:-------------------------------------------------------------------------------- CREATE TABLE games_developers ( developers_id int(5) NOT NULL auto_increment, developers_name varchar(255) NOT NULL default ' ', language_id int(5) NOT NULL default '0', PRIMARY KEY (developers_id,language_id)
3
8572
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need to be aware of updates as they are made to current records. The data the users are looking at is presented in a subform that has the Default View property set to 'Single Form'. In order for each user to see the update to the current record as...
2
2319
by: John Baker | last post by:
Hi: I have a Pop Up form that involves a main form and sub form. The sub form has the results of a query on the main form. I need to automatically perform exactly he same action that takes place when I manually click "Records/refresh" when I update a field on the main form, but am having trouble making that happen. Me.Refresh does not do it, and neither do any of the other things that I have tried. "Records refresh" has the effect of...
2
1904
by: ChadDiesel | last post by:
Everyone on this group has been a great deal of help. I have another question that I could use some help with. Once again, here is a picture of my form: http://www.chadworld.com/images/form.jpg I have a form with a shipment destination at the top. I then have a subform that I enter boxes for that shipment. I have several shipments going at a time, so I can use the control at the bottom of the form to move from shipment to shipment...
2
4402
by: Tom van Stiphout | last post by:
I thought there was a RunCommand for every possible menu option. I have a situation where a dropdown in a subform is often not showing its value until I select Records Refresh. What is the equivalent VBA code? acCmdRefresh and acCmdRefreshPage don't work. combobox.Requery works, but seems overkill. Thanks, -Tom.
4
1538
by: Larry Bud | last post by:
I have a function which return a List, and I'm trying to add users to it from 3 different roles, but I don't want duplicate user names. The "Contains" ALWAYS is returning FALSE, so I'm not finding the dupe. Here's the code: Dim datalist As New List(Of TroubleTicketUser) Dim str As String Dim theroles(2) As String, therole As String theroles(0) = "IT User"
2
1580
by: John1975 | last post by:
OS: XP MS Access 2007 Having some trouble with a join. I have three tables: progress_reports, clippership_archives, and employee conversion progress_reports: id emp_id
2
2506
by: altesse33 | last post by:
I have a command button on the main form of my database that allows users to add new records. But, even though new records get added to the sub table when I click on the button, those new records aren’t immediately reflected in the combo box that is on the subform (whose record source is a junction table). Do you know of any methods I can add in an event procedure to update the subform? I added the following code based on a suggestion I...
0
7947
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8010
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.