#1 2017-05-05 08:28:32

mingda
Member
Registered: 2013-01-04
Posts: 121

ESynException with message 'TJSONSerializer.AddVariant VType=12864'.

Hi, I use below code to generate content, when run will generate ESynException, but if debug step by step, will ok,

var
  HeaderTemplate, LineTemplate, IDs, HeaderContent, LineContent: RawUTF8;
  Ctx: PServiceRunningContext;
  Mustache: TSynMustache;
  HeaderDoc, LineDoc: Variant;

begin

...
  HeaderDoc := Ctx.Request.Server.RetrieveDocVariantArray(TSQLTest,'','ID IN (' + IDs + ')', [], '*');
  Mustache := TSynMustache.Parse(HeaderTemplate);
  HeaderContent := Mustache.Render(HeaderDoc);    //==>here Generate ESynException
...

where is the problem, any suggestions is welcome, thanks!

Mingda

Offline

#2 2017-05-05 08:33:57

mingda
Member
Registered: 2013-01-04
Posts: 121

Re: ESynException with message 'TJSONSerializer.AddVariant VType=12864'.

My mistake, need set the object name

HeaderDoc := Ctx.Request.Server.RetrieveDocVariantArray(TSQLTest,'header','ID IN (' + IDs + ')', [], '*')

Offline

Board footer

Powered by FluxBB