[Solved] New database
[Solved] New database
i created a database and a table but could not add data. created a form for the table but still could not add data. database, table and form all show in respective windows. what am I missing?
Last edited by watmanh on Wed Feb 22, 2017 6:39 pm, edited 3 times in total.
open office 4.1.3 on windows 10
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: New database
Does your table have a Primary Key that Auto Increments?
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
Re: New database
i dont have a primary key. will try to figure out how to add one or redo it since it is a small table and no data will be lost for sure
open office 4.1.3 on windows 10
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: New database
Spreadsheets use Row numbers to differentiate data rows.
Databases require a unique Primary Key in order to differentiate the data rows.
Go to Tools->SQL and edit and enter the following SQL command
it will add a proper Primary Key to your table.
Databases require a unique Primary Key in order to differentiate the data rows.
Go to Tools->SQL and edit and enter the following SQL command
Code: Select all
ALTER TABLE "YourTableName" ALTER COLUMN "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY;
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
Re: New database
got status msg
1: Primary key not allowed in statement [ALTER TABLE "track" ALTER COLUMN "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY]
1: Primary key not allowed in statement [ALTER TABLE "track" ALTER COLUMN "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY]
open office 4.1.3 on windows 10
Re: New database
i was successful in adding a key but thought problem solved before i tried to enter data. forms created for table dont let me add row
open office 4.1.3 on windows 10
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: New database
The Primary Key must be on your form. If you don't want to see the Primany Key while entering data on your form you can hide it.
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