What does this mean?

Attempt to insert null into a non-nullable column: column: ID table: Assets in statement [INSERT INTO “Assets” ( “Item”,“Location”,“Photo”) VALUES ( ?,?,?)]

This happens when I insert a photo specific to the first record and try a save it. Each record for the inventory I am creating will need its own photo.

To be able to help you, further information is required.

  • Which operating system and which LibreOffice version do you use?

  • Do you use BASE with HSQLDB, Firebird or other DB’s?

  • Which field type did you use for inserting?

I am using LibreOffice Base 7,02

@keme2639

S1000 General error java.lang.NullPointerException in statement [SELECT * FROM “Assets”]

So I did the first option and I was able to input 9 records with pictures without any problems. I saved each record as I went on. But when I tried to save the 10th record I got the above message. My database is meant to be very simple with only one table and one form.

Most likely you have a primary key field named ID which is not set up to generate value automatically. The primary key is the field (table column) holding a unique identifier for each record (table row). It is in a sense the “location” of the record.

You have two options:

  • For the ID field, set AutoValue =Yes

    This is the most common situation, where you want to generate an arbitrary number as a unique ID for the record.
  • Explicitly assign a value to ID in the INSERT clause.

    This is useful if the ID primary key is a predefined value attached to the other fields. Most commonly when you update from a different table, but also sometimes when you import external data.

See also this help page.

@keme2639

S1000 General error java.lang.NullPointerException in statement [SELECT * FROM “Assets”]

So I did the first option and I was able to input 9 records with pictures without any problems. I saved each record as I went on. But when I tried to save the 10th record I got the above message. My database is meant to be very simple with only one table and one form.

Charttle gravatar imageCharttle ( 13 hours ago )edit