You are not logged in.
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
My mistake, need set the object name
HeaderDoc := Ctx.Request.Server.RetrieveDocVariantArray(TSQLTest,'header','ID IN (' + IDs + ')', [], '*')
Offline