Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Getting multiple transaction postings

Posted on 1998-05-14
4
130 Views
Last Modified: 2013-12-25
Processing a cgi form in PERL, I am finding duplications (2x & 3x)  of the same record
appearing in the database. Believe the user holds the key down too long or perhaps
presses the submit key multiple times. How can I prevent these multiple transactions?
I'm a novice in PERL & do not know the C language equivalent to flushall(); could that
be the problem?
0
Comment
Question by:lshaffer
  • 2
4 Comments
 
LVL 7

Expert Comment

by:faster
ID: 1828573
The solution depends on your requirement.   Normally you should check whether to a record is OK before inserting it to the database, and normally your database should contain a key field, which means a duplicate record will not be allowed by the db engine.  What database you use?  Try to define a key field then the database will reject such insert automatcially.
0
 

Expert Comment

by:Govinda
ID: 1828574
I agree with faster
0
 

Author Comment

by:lshaffer
ID: 1828575
I'm in the same situation your database uses here. Notice even your database
allowed my record duplication. (Yes I double struck your sumitt key as a test) .              Not too cool for the experts!

(1). I'm receiving a text Change Request Submittal to a library publication by the user.      My database is "Basis" a powerful text DB. But the unique key is auto generated.

(2). Fix your system first then tell me me how?
0
 
LVL 7

Accepted Solution

by:
faster earned 70 total points
ID: 1828576
Firstly, we so called experts are only normal user like you, I (and others replying your question does not have ANY relationship with this site, so I know nothing about the implementation of this site)

Secondly, I don't think the duplite is a big problem (if it can be called as a problem).  No one really cares whether a problem is duplicated, and there is no real good solution to prevent such problem.  The program can of course make the title as the key field, but this may not be desirable.

You must first think carefully for any of your table, can you allow duplicate field.  Give you an example, let's say hotmail.  The program must ensure that user id is unique, but user name, password etc. need not have this restriction.  If one really want to have several account, there is no way to prevent it.

This is why I said it depends on your requirement.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Catch Cancellation error from objShell.Run 10 85
Python 2.7 - Passing arguments 8 73
Need help to rewrite script 3 94
convert Systemjs to Webpack 3 29
Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question