Ask Your Question

Gobbledygook error when trying to save on a database [closed]

asked 2017-02-01 22:29:12 +0100

Pincher gravatar image

updated 2020-07-20 19:48:16 +0100

Alex Kemp gravatar image

I am trying to set up a data base but cannot save due I believe to a submission error, and therefore cannot close the document. The error message is in gobbledygook! What is wrong with my LibreOffice install and can I rectify it.

Also how can I provide enough details if I am not allowed to add attachments?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-07-20 19:48:33.818197



Gave you karma for attachment. Also specify LO version & OS.

Ratslinger gravatar imageRatslinger ( 2017-02-01 22:48:14 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-02-05 02:45:47 +0100

EasyTrieve gravatar image

updated 2017-02-05 02:50:33 +0100

Ok, this is a wild guess, but are you getting something like this error message (probably much more complex, as you probably have many more fields in your table)?

image description

And did it follow these three prompts when you first closed your database design window?

image description

image description

image description

If you answer yes to this third prompt, that creates a unique record key for you named ID, (an additional field added to your other fields) but unfortunately it does not set it's property to AutoValue (i.e. auto increment) which might be helpful at this moment. This is reasonable to not set it to AutoValue, as not all unique keys use the AutoValue feature, but the vast majority of the tables I use do use AutoValue. It's just so handy and easy to get right that way.

(So I consider this a bug to default to AutoValue=No. It frustrates new users unnecessarily.)

What's happening is that when you go to enter a new record, but leave ID empty, or put something in ID other than an unknown number you get this error message.

I'm guessing your table ID column probably looks like this (empty) when you attempt to input your first record:

image description

This is easy to fix if you're using the default database, i.e. if your status bar looks like this: image description

1) Right click on your tableName and select Edit...

2) Select the ID line, then below set AutoValue to Yes, exit and save.

If you're connecting to a MySQL/MariaDB data base it's a little more frustrating because of a 2nd bug. You have to make sure that you add an ID field, and set AutoValue to Yes when you save the table the very first time. Although it will appear like you can edit this later, it doesn't work properly. So you have to get it riight the first time.

(Or you can create your MySQL/MariaDB tables in something like phpMyAdmin, or my new favorite, HeidiSQL, then open them from LibreOffice, rather than create them in LibreOffice.)

The error message is telling you that the ID field is null, or has nothing in it, which is not valid for this type of field, i.e. the "non-nullable column: column: ID" verbiage. (I don't know why the word column: is repeated, this too seems like a minor bug.) This is followed by the actual SQL statement that was used to try and append your record to the table, "IINSERT INTO "Table1" ("txt") VALUES (?). This is a prepared statement, as you can see by the appearance of the question mark (?) in it. Your data replaces the question mark when the statement is executed, and this inserts your value into the given field, "txt" in this case.

Hope this is on the right track. Sorry if it's too much info. I just struggled with some of this getting started and hope others can not have to bottom out in all of the pit ... (more)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-02-01 22:29:12 +0100

Seen: 74 times

Last updated: Feb 05 '17