#1 mORMot 2 » FormatUTF8 / ToArrayOfConst – Is there a limit on the number of params » Yesterday 14:04:00

FLIXNRK
Replies: 1

Hi everyone,

I’m using mORMot 2 and I’ve run into a strange limit with FormatUTF8.
I build an SQL string template like this (with many % placeholders) and then call:
sql := FormatUTF8(jsonTemplate, TDocVariantData(bounds).ToArrayOfConst);

As soon as I use more than ~30 placeholders/arguments, I start getting errors like “too many arguments” or the formatting simply fails.
If I take the same template and the same arguments and run it through Delphi/FPC’s Format() instead, it works fine with more parameters.

So my question is:

Does FormatUTF8 in mORMot 2 have a built-in limit for the number of arguments, or is this a known issue/bug?
And is there a recommended way to handle cases where I need 40+ parameters (e.g. big SQL UPDATE statements)?


Thanks in advance!

Board footer

Powered by FluxBB