Page 1 of 1

DBGrid insert fails - Raspberry Pi Jessie, PostgreSQL 9.4.10, Lazarus

Posted: 02.06.2017, 12:22
by ertank
Hello,

I have a project that has to be developed on a Raspberry Pi 3 device. I am using Lazarus 1.8RC1 and Zeos 7.2.1-RC1. Both built from sources. PostgreSQL is installed using apt-get and running on Raspberry Pi.

I have below table in my database:

Code: Select all

CREATE TABLE malzemeler
(
  kodu character varying(20) NOT NULL,
  adi character varying(40),
  paketiciadet smallint,
  kayitzamani timestamp without time zone,
  kaydeden character varying(40),
  degisiklikzamani timestamp without time zone,
  degistiren character varying(40),
  secili smallint,
  CONSTRAINT malzemeler_pkey PRIMARY KEY (kodu)
)
I put ZConnection, ZQuery, DataSource and DBGrid. All settings are defaults. Adjust necessary links. Establish connection and Activate the query at design time. Query is a simple one

Code: Select all

select * from malzemeler
I run the application try to add a new record and I receive below error message:

Code: Select all

null value in column "kodu" violates not-null constraint
DETAIL: Failing row contains (null, null, null, null, null, null, null, null).
However, I have a value entered in DBGrid in column "kodu" and focus is set to another column just to be sure that value is assigned to the column.

Same problem I can reproduce using 7.1.4 stable package. But I need to use 7.2 latest for PostgreSQL and recently changed transaction behavior.

Any help is appreciated.

Thanks & regards,
Ertan

Re: DBGrid insert fails - Raspberry Pi Jessie, PostgreSQL 9.4.10, Lazarus

Posted: 06.06.2017, 14:47
by marsupilami
Duh - I will have to get my Raspberry PI set up to test this. I will be back when that is finished.

Re: DBGrid insert fails - Raspberry Pi Jessie, PostgreSQL 9.4.10, Lazarus

Posted: 06.06.2017, 21:23
by ertank
I do believe this problem directly links to my other thread here: http://zeoslib.sourceforge.net/viewtopi ... 40&t=68754