sub generateCategoryXML_helper()
dim FSO, fileOut
set FSO = CreateObject("Scripting.FileSystemObject")
set fileOut = FSO.CreateTextFile(Server.MapPath("categoryTree.xml"), True)
fileOut.WriteLine("<?xml version=""1.0"" encoding=""UTF-8""?>")
set RS_categoryXML = callStoredProcedure("generateCategoryXML", null)
while not RS_categoryXML.EOF
fileOut.Write(RS_categoryXML(0))
RS_categoryXML.MoveNext
wend
end sub
The fileOut.Write(RS_categoryXML(0)) throws an error: Microsoft VBScript runtime error: Invalid procedure call or argument
RS_categoryXML(0) contains an XML doc. RS_categoryXML(0) stored as a byte array. Why? It should be a long string that I can write to the file but for some reason it's stored as a byte array and fails to output.
Thanks,
Tomas