Bug 130881 - Error message i can not fix
Summary: Error message i can not fix
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-23 09:26 UTC by domingobrado@gmail.com
Modified: 2020-02-23 17:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
My Spanish Timbrado date base (6.54 KB, application/vnd.oasis.opendocument.database)
2020-02-23 09:29 UTC, domingobrado@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description domingobrado@gmail.com 2020-02-23 09:26:52 UTC
Description:
Hello, 

I created my birds breeding bases with a you tube tuto.
Normally i'm good but when i want to record them after having inserted datas, it is impossible and an error message appear eveytime.
i have simplified anything, for example, no need to tape specific date's caracters, just tape the full number example : 23022020 not 23/02/2020, to avoid troubles, but well troubles there is...
Can you help please ?

My desktop is under Debian9

"Statut SQL: 23000
Code d'erreur: -10

Attempt to insert null into a non-nullable column: column: ID Repro table: Reproductions 2020 in statement [INSERT INTO "Reproductions 2020" ( "CA Observations","Compléments alimentaires","DE Observations","DP Observations","Date mise a couver OT","Date ponte O2","Date ponte O3","Date ponte O4","Date ponte O5","Date ponte Oeuf 1","Date rencontre","Date éclosion O1","Date éclosion O2","Date éclosion O3","Date éclosion O4","Date éclosion O5","Dosage","ID Femelle","ID Male","ID Repro","NJV Observations","Nombre jeunes viables","Observations","RefBague femelle","RefBague male","RefRepro") VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]"


Actual Results:
i can't record my all bases

Expected Results:
being able to record my bases (wish i could use them properly too)


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: fr
Module: TableDataView
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: no
Comment 1 domingobrado@gmail.com 2020-02-23 09:29:57 UTC
Created attachment 158114 [details]
My Spanish Timbrado date base

Hello,

Please find joined my full data base.
I did my best to make it as clean as possible but seems that i did copy a mistake on all bases.
Thanks for helping.
Dom
Comment 2 Robert Großkopf 2020-02-23 14:42:26 UTC
This is the hint to the problem:
«Attempt to insert null into a non-nullable column: column: ID»

There is no field "ID" in your form. But "ID" needs a value.

This error appears very often, when
- people create a primary-key as INTEGER but
- didn't set this field to AutoValue and
- don't import this field into the form, because it hasn't been imported in the tutorial.
Comment 3 Robert Großkopf 2020-02-23 14:50:18 UTC
Note:
Only the field "Date éclosion O5" in the table "Reproductions 2020" is set to accept no entry. All other fields must have an entry and will report «Attempt to insert null into a non-nullable column»
Comment 4 domingobrado@gmail.com 2020-02-23 15:56:52 UTC
(In reply to Robert Großkopf from comment #2)
> This is the hint to the problem:
> «Attempt to insert null into a non-nullable column: column: ID»
> 
> There is no field "ID" in your form. But "ID" needs a value.
> 
> This error appears very often, when
> - people create a primary-key as INTEGER but
> - didn't set this field to AutoValue and
> - don't import this field into the form, because it hasn't been imported in
> the tutorial.

---------------------------------------------------------------------------------

Hallo Robert,

Danke für die hilfe !

In the tuto, the "ID entrée" case have to be aimed with the little "gold key" at its left side, and the "type de champ" have to be settle on "integer[INTEGER]" and "Autovalue", to get automatically a value. 

What i did...so i don't understand what's wrong here ! 
Do i have to erase "integer[INTEGER]" and replace by "text[VARCHAR]" ? 
Then i could put a better "ID" than just a number but i will loose the auto function correct ?
Comment 5 domingobrado@gmail.com 2020-02-23 16:16:15 UTC
(In reply to Robert Großkopf from comment #3)
> Note:
> Only the field "Date éclosion O5" in the table "Reproductions 2020" is set
> to accept no entry. All other fields must have an entry and will report
> «Attempt to insert null into a non-nullable column»

----------------------------------------------------------------------------

It's ok for this problem !

I did check the field "Date éclosion 05" and changed "input required" to "Yes".
Also the sign "-" may not be recognize as a caracter like a letter or a number (?).
My table "Reproductions 2020" is registered now.

Danke !
Comment 6 Robert Großkopf 2020-02-23 17:52:30 UTC
Hi Dom,
> 
> What i did...so i don't understand what's wrong here ! 
> Do i have to erase "integer[INTEGER]" and replace by "text[VARCHAR]" ? 
> Then i could put a better "ID" than just a number but i will loose the auto
> function correct ?

Seems it hasn't set to AutoValue.
Open the table for editing, not for input values.
"ID Repro" will be the first field.
Go to the properties of the field and set "Auto Value" > 'Yes'
Save the table and all will work.

Have tested this with your attachment. It is a internal HSQLDB. So this value could be changed without any problem.

I will set this one to WORKSFORME. Feel free to contact me per private mail, if this problem couldn't be solved.