[Solved] Preventing Duplicate Entries on Database

Discuss the database features
Post Reply
AFsarge
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

[Solved] Preventing Duplicate Entries on Database

Post by AFsarge »

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
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Post by Villeroy »

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 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
AFsarge
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Post by AFsarge »

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
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Post by Villeroy »

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 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
AFsarge
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Post by AFsarge »

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

Post by AFsarge »

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 153 times
windows 10
OpenOffice 4.1.1
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Preventing Duplicate Entries on Database

Post by Villeroy »

Unique index on 4 text fields.
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 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
AFsarge
Posts: 5
Joined: Wed Feb 07, 2018 12:53 am

Re: Preventing Duplicate Entries on Database

Post by AFsarge »

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
Post Reply