Hi,
I presumed I could output QueryToJSON() to a variable (ultimately to a file), but I do not know how to manage the .Flush sub which renders the output instead:
<%
'My .json file:
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile(Server.MapPath("/data/json/tasks.json"),true)
'Output the results to a variable (for example) and to the .json file:
str=QueryToJSON(cn, "SELECT Project, Description from tblTasks").Flush
fname.WriteLine(str)
%>
As I understand it the .Flush sub renders the contents immediately. Can anyone tell me how to save or handle the data without rendering it?
Please help, your answer is greatly appreciated !!
Gary