#1 2015-11-03 19:24:34

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Problem with Boolean Parameter

Hi AB

today i had 2 Different Problem with Interface functions especially the Parameters. But i'll explain:

The first Problem is with the 2 Boolean Parameter.

function DoSomething(const AParam1: RawUtf8; const AParam2: TDateTime; const ABParam1, ABParam2 : boolean) : RResultRec;

I called it with DoSomething('test', <datevalue>, true, false)

But the the Serverfunction got DoSomething('test', <datevalue>, false, false)
I looked in mORMot - Source and saw that SystemParameters contained Value -1 for BParam1 and 0 for BParam2 But they where not correctly transmitted to the function call.
As Workaround i changed the Type from Boolean to Integer and pass 0/1 now. That works fine !

The Second Problem is a Exception if TDateTime Parameter is 0. As WorkAround / Solution i changed TDateTime to RawUtf8 and pass date as iso8601


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB