[Solved] Preventing Duplicate Entries on Database

Discuss the database features

[Solved] Preventing Duplicate Entries on Database

Postby AFsarge » Wed Feb 07, 2018 1:12 am

I am new and somewhat have figured out how to create a form and a database.
I have simple entries which are, "callsign", "area" and "power" Example of data entered is WD8MBE(calsign), OH(area) and Low(power).

I went into the table to set a Unique Field (which I want callsign set as the unique field) but when I go to save I get an error of (DROP INDEX "SYS_IDX_46" on "Table1". I have already checked for duplicates and found none.

What am I doing wrong? I need to get this going soon as I am the event manager for an Amateur Radio group and need to get their Callsigns and other info organized.

Thanks in advance!
Last edited by Hagar Delest on Thu Feb 08, 2018 4:06 pm, edited 1 time in total.
Reason: tagged solved
windows 10
OpenOffice 4.1.1
AFsarge
 
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Postby Villeroy » Wed Feb 07, 2018 12:40 pm

AFsarge wrote:I went into the table to set a Unique Field (which I want callsign set as the unique field)

How exactly do you do this? Primary key? Index designer?
Creation of a unique index fails if there are duplicates in the table.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25384
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Postby AFsarge » Wed Feb 07, 2018 12:44 pm

I used index designer and there aren't any duplicates in the database.

I attached a screenshot of what I get when I try to create using the index designer.
Attachments
Screenshot (10).png
Last edited by AFsarge on Wed Feb 07, 2018 1:18 pm, edited 1 time in total.
windows 10
OpenOffice 4.1.1
AFsarge
 
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Postby Villeroy » Wed Feb 07, 2018 12:49 pm

Please upload your database. Close the database, click [Post Reply], scroll down, click [Upload Attachment]
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25384
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Postby AFsarge » Wed Feb 07, 2018 1:23 pm

Here it is.
Attachments
Screenshot (11).png
windows 10
OpenOffice 4.1.1
AFsarge
 
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Postby AFsarge » Wed Feb 07, 2018 1:39 pm

Here is the database.
I drivetruck during the day, so I have to get on the road shortly and won't be able to read any posts until after 5pm EST. Thanks
Attachments
WFD2018 Logs RXD.odb
(26.92 KiB) Downloaded 18 times
windows 10
OpenOffice 4.1.1
AFsarge
 
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Postby Villeroy » Wed Feb 07, 2018 2:43 pm

IndexDesign2018-02-0713-32-24.png
Unique index on 4 text fields.
This is the index I was able to create on your Table1. I clicked the left button for a new index, entered some name (uniqTable1), checked the unique option, added all 4 text fields and saved the index.
Now you can not enter any duplicate records with the same callsign, section, power and category.

Btw: The sort order on indices has no meaning with this type of database connection.
The other index "SYS_IDX_46" was automatically generated when you declared the ID number as the table's primary key. You tried to modify that index.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25384
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Postby AFsarge » Thu Feb 08, 2018 12:37 am

Villeroy, I thank you! That did the trick. I keep telling my 13 year old Grand-Daughter, you learn something new every day. I'm almost 65 and learned something new..
I had searched the web and really couldn't find an answer and that one index error kept popping up but nothing to explain it. Now all I need to do is finish the Form and start entering data.

I Greatly Appreciate You Help!
windows 10
OpenOffice 4.1.1
AFsarge
 
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am


Return to Base

Who is online

Users browsing this forum: No registered users and 6 guests