New user

Creating and using forms
Post Reply
rhennessy@nyc.rr.com
Posts: 31
Joined: Tue Jul 26, 2016 10:54 pm

New user

Post by rhennessy@nyc.rr.com »

:?: Hi

I have just started using Open Office and today I created an address book database using the wizard. When I attempted to save my database I received the attached error message. I have no idea to what it refers. Can you folks tell me what I have done wrong? :?:

Thanks in advance
Bob H
Attachments
Screenshot (697).png
Windows 10
Open office 4.1.2
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Post by RoryOF »

Exactly what it said - you didn't put an entry into a field that required an entry.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rhennessy@nyc.rr.com
Posts: 31
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Post by rhennessy@nyc.rr.com »

Hi
Looks to me like each of the fields I created was filled in..............no?

Bob H
Windows 10
Open office 4.1.2
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Post by RoryOF »

Your insertion code does not seem to have received the values from your form - witness the ?,?,?,?,? message.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
rhennessy@nyc.rr.com
Posts: 31
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Post by rhennessy@nyc.rr.com »

Ok
As I said, I'm only starting to use Open Office. Can you explain the insertion code values to me

Thanks
Bob H
Windows 10
Open office 4.1.2
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Post by RoryOF »

No, I don't do data bases, so you'll have to wait for someone more experienced in that field to come online.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: New user

Post by UnklDonald418 »

Attempt to insert null into a non-nullable column: ID table:
Address Book …
This indicates that in your table named Address Book you have a field named ID that requires a value before the new record can be inserted.
There are two ways to remedy this problem.
Open table Address Book in the design mode. Select the ID field and look toward the bottom of the window. You should see AutoValue change that to Yes then save your table.
Or you can go to Tools->SQL and enter the command

Code: Select all

ALTER TABLE "Address Book" ALTER COLUMN "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY;
when that is successfully executed it will make the needed change in your table.
You should then be able to enter new records without the error message.
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
rhennessy@nyc.rr.com
Posts: 31
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Post by rhennessy@nyc.rr.com »

Hi Rory
Ok, I'm a bit confused. As you can see from the screenshot there are 5 fields that I've created and named, none of which is named ID.

Oh and thanks for answering
Windows 10
Open office 4.1.2
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: New user

Post by UnklDonald418 »

ID is automatically added to your table if you didn't designate a Primary Key when the table was entered. The HSQL database engine requires it for data integrity. Because it is auto-generated changing that value can lead to all sorts of undesirable results so it is often omitted from a visible position on a Form.
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
rhennessy@nyc.rr.com
Posts: 31
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Post by rhennessy@nyc.rr.com »

Ahhhhhhhhhhhhh
Ok, so how does one designate a Primary Key or should I just leave ID as the primary?

Bob H
Windows 10
Open office 4.1.2
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: New user

Post by UnklDonald418 »

Because Primary Keys must be unique designating your own often leads to problems down the road. I've found that it is best to use the auto-generated ID.
For your information if you open your table in the Design Mode and right click on the little grey box in front of the field you want to change a pop-up window will offer some options including 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