Creating new database: Unable to set Auto Value

Discuss the database features
Post Reply
Jonahjones
Posts: 11
Joined: Sun Apr 20, 2014 2:08 pm

Creating new database: Unable to set Auto Value

Post by Jonahjones »

I'm new and have got stuck creating a new database. Following the instructions, I reached Step 3 in "How to create a new Database" and cannot perform action number 4 as the Auto value is greyed out.
OpenOffice 4.0.1 on Windows 10
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Creating a new database

Post by UnklDonald418 »

A database table can have only one auto value field, so perhaps you have already defined another one.
Since there are numerous sets of instructions, a link to the instructions you are using would be helpful.
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
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Creating a new database

Post by Villeroy »

A new database with an embedded HSQLDB, one table, 2 columns created with OpenOffice.
Open the table for editing and mark the integer column as auto-value.
Attachments
109412.odb
(3.31 KiB) Downloaded 64 times
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
Jonahjones
Posts: 11
Joined: Sun Apr 20, 2014 2:08 pm

Re: Creating a new database

Post by Jonahjones »

The problem section of the instructions:
Step 3: Set primary key
1) Create a primary key should be checked.
2) Select the option Automatically add a primary key and check Auto Value.
3) Click Next.
What doesn't seem to work is the instruction to check auto value. This is exactly similar to the more illustrated version.
Since that time I've cobbled something together that partly works by ignoring those instructions, so I'm continuing with that. However, I'd like to do it properly as I still don't know what a primary key might be.
OpenOffice 4.0.1 on Windows 10
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Creating a new database

Post by UnklDonald418 »

A Primary Key is usually an Integer, used by the database engine to uniquely identify a record/row in a database table.
A table without a Primary Key is Read Only, no new records can be added.
The auto value property allows the database engine to automatically generate a unique Primary Key value when a new record/row is entered into a table.
In a table with a Primary Key and no auto value, it is up to the user to enter a unique value for the Primary Key.
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