'True' word added at the end of oResponse.Write() output

Topics: Developer Forum, Project Management Forum, User Forum
Aug 12, 2015 at 10:53 AM
Hi,

I am returning an XML string from avfp 6.x script in vfp via WinHttpRequest.5.1 and receive 'True' word appended in the end of the response.write(lcStr) result as

</VFPData>
True


Why am I getting this 'True' word and how can I remove it ?

I saved the XML string to a file before oResponse.write() and it was without 'True' word at the end.

I also tested this in west-wind script and I got correctly </VFPData> at the end Without the word "True".

Here is the code part

oResponse.ContentType ="txt/xml"
oResponse.CharSet="UTF-8"
=CURSORTOXML(lcAlias,[lcStr],3,2+4+8+32,0,"1","","")
oResponse.Write(lcStr)

Regards,
Naeem
Aug 12, 2015 at 6:35 PM
Hi,

I found that word 'True' is a result of "Return" statement. The script is

<%
oResponse.ContentType ="txt/xml"
oResponse.CharSet="UTF-8"
=CURSORTOXML(lcAlias,[lcStr],3,2+4+8+32,0,"1","","")
oResponse.Write(lcStr)

if <some condition>
  • some code here and then
    Return
    endif
  • some more code
    %>
How can I use "Return" statement without adding/appending its value in oResponse.Write() call ?

Regards
Naeem