By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,072 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,072 IT Pros & Developers. It's quick & easy.

How to Prevent Duplicate Records??

100+
P: 131
Hi all once again!!!
I have a Database that runs perfectly under carefully users. Due to the limitations on the database design capabilities I decided to use Transactions
(You enter data once and then deleted by the appropriate queries following transactions to related tables) in which the forms you enter data is
always empty after executions. Sometimes users tend to enter the same records once again just because they don't see them in the respective tables.
They repeat several times before make a call for assistance. The whole applications become obsolete as there are many complaints than congratulations.
How to prevent user from entering exactly the same record as he/she entered before???
Dec 23 '11 #1
Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,709
Wrong question. You should be asking :
"How do I design the database such that users feel comfortable working with it and they never even think of making such mistakes?".
Dec 23 '11 #2

100+
P: 131
Well NeoPa! this may be a wrong question but they have been using the application for a year or so and already have cases with duplicate records and tried to solve it by deleting the duplicated data! the question is, by how many times Am I going to visit users for same cases??
At least it should be query failures during executions that prevent any usage of this database but I dont have such case so far. This is my serious case !Duplicate!
I have read similar topic in this forum but couldnt find one fit my applications.
May be it worth to give further details!
My applications allows data entry at Form1, Editing at Form2 and Deleting at Form3. Data entered at Form1 is transacted to the database by append queries to the tblForm2 (table of Form2) and other tables in the database. Form2 is for editing only and Form3 is for deleting some/all records only.
If the data entered at Form1 matches to the one at Form2 then it should stop transactions, else if no match found then it should continue running the queries so that no duplicates shall be found in the database.
The actions is at ONUNLOAD of the Form1.
Please help
Dec 24 '11 #3

100+
P: 131
Ok thanks for your time! I have set all records in Form1 and Form2 as primary keys to prevent any duplicate records, and set the appending action of tblForm2 to be first one so as to prevent any triggering incase of anything.
Finally it solves my problem! I dont know the pitfalls on this that might come in the near future.
Thanks
Dec 24 '11 #4

NeoPa
Expert Mod 15k+
P: 31,709
I hear what you're saying, but my advice is still the same. It is never a good idea to proceed from the design stage with such a flawed design. It may allow you to get something running quickly, but it will certainly cause you increasing problems going forward, depending on how much you try to build onto it. It's a bit like the bible story of building your houses on sand. Not a good plan.

Your choice ultimately, but that's my advice, and I'd feel I'd have let you down if I'd offered anything else.
Dec 25 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.