New user

Creating and using forms

New user

Postby rhennessy@nyc.rr.com » Wed Jul 27, 2016 5:50 pm

:?: 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
rhennessy@nyc.rr.com
 
Posts: 29
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Postby RoryOF » Wed Jul 27, 2016 6:11 pm

Exactly what it said - you didn't put an entry into a field that required an entry.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31451
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Postby rhennessy@nyc.rr.com » Wed Jul 27, 2016 6:15 pm

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

Bob H
Windows 10
Open office 4.1.2
rhennessy@nyc.rr.com
 
Posts: 29
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Postby RoryOF » Wed Jul 27, 2016 6:24 pm

Your insertion code does not seem to have received the values from your form - witness the ?,?,?,?,? message.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31451
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Postby rhennessy@nyc.rr.com » Wed Jul 27, 2016 6:34 pm

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
rhennessy@nyc.rr.com
 
Posts: 29
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Postby RoryOF » Wed Jul 27, 2016 6:36 pm

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.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31451
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New user

Postby UnklDonald418 » Wed Jul 27, 2016 10:02 pm

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   Expand viewCollapse view
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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1330
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: New user

Postby rhennessy@nyc.rr.com » Wed Jul 27, 2016 10:09 pm

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
rhennessy@nyc.rr.com
 
Posts: 29
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Postby UnklDonald418 » Wed Jul 27, 2016 10:35 pm

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1330
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: New user

Postby rhennessy@nyc.rr.com » Wed Jul 27, 2016 10:38 pm

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
rhennessy@nyc.rr.com
 
Posts: 29
Joined: Tue Jul 26, 2016 10:54 pm

Re: New user

Postby UnklDonald418 » Wed Jul 27, 2016 11:30 pm

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1330
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests