TRODynamicRequest.DoWriteParams requires System.Variants.NullStrictConvert

I just spent several hours chasing a crash in RO/DA TRORequestParam

It only occured in one of my RO/DA applications and it only occured in case it was a master/child table (due to MethodName switch and RefreshParams)

After a lot of debugging I found out it was caused by global System.Variants.NullStrictConvert setting.

Are there any plans of removing this constraint?

Hi,

hmm, nobody for the latest 17 years complained about this case…

Can you specify what exactly line(s) in Data Abstract affects to NullStrictConvert settings, pls?

also a small testcase will be appreciated.

you can drop email to support@ for keeping privacy

Hi,

It is line 1129 of uRODynamicRequest.pas in my case
l_unicodeString := aParam.AsWideString;

It’s DA3, don’t know if it is specific to DA3

FYI:

The fSimpleValue:=Null is the culprit
from
procedure TRORequestParam.CopyRODLParam(aSourceParam: TRODLOperationParam; aPersistValues: Boolean; aOldParams: TRORequestParamCollection);
var
l_param: TRORequestParam;
begin
Name := aSourceParam.Name;
Flag := aSourceParam.Flag;
DataType := StrToDataType(aSourceParam.DataType);

fSimpleValue := Null;
if DataType = rtUserDefined then
TypeName := aSourceParam.DataType
else
TypeName := ‘’;

FYI: The AsString function does not suffer from the same issue.
I can imagine that most people use string (which is also a 16bit string nowadays)

Hi,

DA3 was released ages ago …

try to change uRODynamicRequest.pas as

function TRORequestParam.GetAsWideString: UnicodeString;
begin
  Result := VarToUnicodeStrDef(fSimpleValue, ''); // or VarToWideStrDef for DA3
end;

hmm, it already has code like

function TRORequestParam.GetAsString: string;
begin
  Result := VarToStrDef(fSimpleValue, '');
end;

so it shouldn’t depend on NullStrictConvert setting

FTR, we really do not support DA3 anymore, it is was released so long ago that even our download page that goes back to 2009 doesn’t have it anymore ;).

Please update to a newer version of DA.