Solved

Getting multiple transaction postings

Posted on 1998-05-14
4
127 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
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…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now