Solved

Getting multiple transaction postings

Posted on 1998-05-14
4
131 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
[X]
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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

730 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