You are not logged in.
Pages: 1
Hi ab, i got the following code:
var
lbatch: TRestBatch;
lrec: TOrm;
...
begin
lbatch := TRestBatch.Create(DBServer.Orm,
DBModel.Table[ltblname],10000,
[boInsertOrReplace,boExtendedJson]);
lrec := DBModel.Table[ltblname].CreateAndFillPrepare(ajson);
lrec.FillRewind;
while lRec.FillOne do
begin
lrtn := lbatch.Add(lrec,true,true);
......
some field values in ajson are nulls, but after execute as follow:
lrtn := DBServer.Orm.BatchSend(lbatch);
filed values in sqlite become emtpy string or zero depends on its type.
how to keep the null values into the sqlite?
Thank you very much!
Offline
How do you store "null" in pascal code? What is the TOrm fields definition?
There is a single way to store such value in our ORM, it is by using a NullableVariant.
See e.g. https://synopse.info/forum/viewtopic.ph … 737#p34737
and https://synopse.info/files/html/Synopse … l#TITL_177
Online
thanks, i will try it.
Offline
after change the field delfinition in TOrm to NullableUtf8text, it worked.
Thanks again!
Offline
Pages: 1