[Solved] LibreOffice Base: Index not found error
-
- Posts: 4
- Joined: Tue Jul 11, 2023 3:59 pm
[Solved] LibreOffice Base: Index not found error
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 (34.25 KiB) Viewed 3401 times
Last edited by MrProgrammer on Tue Aug 01, 2023 5:52 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
Re: LibreBase Index not found error
The database seems to be corrupted.
Which format is used: HSQL native or external, Firebird, another?
Which format is used: HSQL native or external, Firebird, another?
OpenOffice 4.1.12 - Windows 10
-
- Posts: 4
- Joined: Tue Jul 11, 2023 3:59 pm
-
- Posts: 4
- Joined: Tue Jul 11, 2023 3:59 pm
Re: LibreBase Index not found error
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
Re: LibreBase Index not found error
Are you sure that all database packages has been installed?
OpenOffice 4.1.12 - Windows 10
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: LibreBase Index not found error
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
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"
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");
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
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
-
- Posts: 4
- Joined: Tue Jul 11, 2023 3:59 pm
Re: LibreBase Index not found error
witch database packages needs to be installed
LibreOffice-Fresh(7.5.4-3) on Garuda Linux
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: LibreBase Index not found error
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
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
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.
Code: Select all
SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLE_CONSTRAINTS
Code: Select all
ALTER TABLE "TABLE_NAME" DROP CONSTRAINT "CONSTRAINT_NAME";
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
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11