[Solved] LibreOffice Base: Index not found error

Discuss the database features
Post Reply
KaziiTheAvali
Posts: 4
Joined: Tue Jul 11, 2023 3:59 pm

[Solved] LibreOffice Base: Index not found error

Post by KaziiTheAvali »

I am having trouble trying to remove the unique form a chart for my database class. i need 2 things to be the same and its throwing this error whenever i try to make it unique.
Attachments
Screenshot_20230711_090925.png
Screenshot_20230711_090925.png (34.25 KiB) Viewed 3408 times
Last edited by MrProgrammer on Tue Aug 01, 2023 5:52 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: LibreBase Index not found error

Post by Mr.Dandy »

The database seems to be corrupted.
Which format is used: HSQL native or external, Firebird, another?
OpenOffice 4.1.12 - Windows 10
KaziiTheAvali
Posts: 4
Joined: Tue Jul 11, 2023 3:59 pm

Re: LibreBase Index not found error

Post by KaziiTheAvali »

unshure the default
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
KaziiTheAvali
Posts: 4
Joined: Tue Jul 11, 2023 3:59 pm

Re: LibreBase Index not found error

Post by KaziiTheAvali »

it was a new HSQLDB Embedded database. it does that for any database like that i try to make
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: LibreBase Index not found error

Post by Mr.Dandy »

Are you sure that all database packages has been installed?
OpenOffice 4.1.12 - Windows 10
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: LibreBase Index not found error

Post by UnklDonald418 »

Embedded HSQL doesn't support SHEMA queries, so trouble shooting your Index issue will be difficult.
My suggestion would be to create a new table without any added Indexes then copy your data into the new table.
A Unique constraint can be added to a table using SQL commands at Tools>SQL
The basic form is

Code: Select all

ALTER TABLE "SomeTableName" ADD CONSTRAINT "ConstraintTitle" UNIQUE("ColumnName");
If there is an existing violation of the Unique constraint an error message will tell you so, otherwise HSQL will enforce that constraint on all future entries into the table.
The "ConstraintTitle" is optional, if you skip that HSQL will create one.
The advantage of named constraints is that later you can easily remove "ConstraintTitle"

Code: Select all

ALTER TABLE "SomeTableName" DROP CONSTRAINT "ConstraintTitle";
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
KaziiTheAvali
Posts: 4
Joined: Tue Jul 11, 2023 3:59 pm

Re: LibreBase Index not found error

Post by KaziiTheAvali »

Mr.Dandy wrote: Thu Jul 13, 2023 8:57 am Are you sure that all database packages has been installed?
witch database packages needs to be installed
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: LibreBase Index not found error

Post by UnklDonald418 »

I doubt there is a problem with your installation but I need correct my earlier statement about SCHEMA queries and Embedded databases. The following query should list all the constraints

Code: Select all

SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLE_CONSTRAINTS
For your "unique" issue, look for tables in the list with UNIQUE type constraints and note the TABLE_NAME and CONSTRAINT_NAME. Constraints can be removed at TOOLS>SQL with a statement of the format

Code: Select all

ALTER TABLE "TABLE_NAME" DROP CONSTRAINT "CONSTRAINT_NAME";
The Index GUI might be helpful when using other types of database connections but Embedded HSQL builds indexes as needed, so you shouldn't need it there.
Of course once you remove the UNIQUE constraint and you add a record with duplicate data, you can't go back without first removing the duplication.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply