Lazarus

Free Pascal => Database => Topic started by: Nomos on May 02, 2020, 12:51:19 am

Title: Error message from TSQLQuery: Field TimeModified is required but not supplied.
Post by: Nomos on May 02, 2020, 12:51:19 am
Lazarus 2.08
Windows 10
SQLite

Hello, everyone.

I am currently creating a small application with Lazarus 2.08, based on SQlite.

There are two tables (Members, Shares) in SQLite with an 1:n relation. In both
tables is a datafield

TimeModified     TIMESTAMP CONSTRAINT [CURRENT_TIMESTAMP] NOT NULL DEFAULT (CURRENT_TIMESTAMP)

This datafield isn't used within the application.

But the behavior is different:

Appending a record to the table SHARES everything is fine. Appending a new record to MEMBERS I receive
an error message:

Code: Pascal  [Select][+][-]
  1. "Project MyProject released Exception Class "EDataBaseError" with Message:
  2. queryMembers: Field TimeModified is required but not supplied."

Maybe the message is slightly different when using the IDE in english. I translated the message from german.

Somebody out there who can give me a hint what to do?

Regards
Title: Re: Error message from TSQLQuery: Field TimeModified is required but not supplied.
Post by: chuckles1066 on July 06, 2020, 12:32:49 pm
NOT NULL means it needs a value.

Is it NOT NULL in the SHARES table?
TinyPortal © 2005-2018