#1 2022-07-26 11:08:23

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Error on BatchSend and Postgres with empty dates.

Hi,
I have a DB error on PostgreSQL using RestServerDb.BatchSend(tmpBatch) on inserts or updates.
The problem occurs when I add or update almost 2 records and a date field is empty.
Infact BatchSend send an empty string to a Db date field, generating the error.
It seems that the batch routine on multi updates fails to assign the empty date sending an empty string.
It's true or am I doing something wrong?
Thanks in advance!

Last edited by Stemon63 (2022-07-26 11:38:18)

Offline

#2 2022-07-26 15:40:10

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,700
Website

Re: Error on BatchSend and Postgres with empty dates.

What is an empty date field?
Of a value of 0?

Do you use mORMot 1 or mORMOt 2?

Offline

#3 2022-07-27 08:39:43

Stemon63
Member
Registered: 2016-10-24
Posts: 50

Re: Error on BatchSend and Postgres with empty dates.

Hi Arnoud,
I use mORMot 2.
When I create an ORM object, and assign some fields but I don't assign that date field (TDateTime).
(It seems it have value of 0 (30/12/1899) )
The statement in Postgres have an exception on a empty string value.
The problem is only present on RestServerDb.BatchSend(tmpBatch) with multirecords updates.
Thanks in advance

Offline

Board footer

Powered by FluxBB