XML return output

  • I have a XML query that is returning a long XML formatted string that seems to exceed the byte size of a column. It is cutting out after 2119 chars. Can the XML string be returned as an output parameter? Any other suggestions would be helpful as well.

    Patrick Quinn

    TRMS Database Administrator

  • To be more specific, it seems that the stored procedure is inserting a line break within the XML text string to invalidate it. I run the query thru QA and our developer calls the procedure from his client program and he runs into the same issue. How can we stop these line breaks from being inserted in the XML text string?

    Patrick Quinn

    TRMS Database Administrator

  • One of ways I use to output xml to file.

    output query (stored procedure etc) result in xml format to url

    use wsh take the url as input and output to file.

    Check BOL for the first step. Preper using template.

    The second step see code below

    (sample code taken from MSDN, title 'Script Your Database')

    ' Set the url of the request

    xmlpath = "http://localhost/pubs/t/OrderDespatched.xml"

    ' create an instance of the XML Parser

    Set myXMLDoc = CreateObject("Microsoft.XMLDOM")

    ' Don't want asynchronous

    myXMLDoc.async = false

    ' Load the URL

    myXMLDoc.Load xmlpath

    ' Save the document

    myXMLDoc.save "fileout.xml"

    You may want to save the code in .vbs format.

    Execute the vbs file and check fileout.xml for result.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply