?
Solved

Getting multiple transaction postings

Posted on 1998-05-14
4
Medium Priority
?
135 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
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…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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…
Suggested Courses

762 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