Re: 8192 character limit in Query Analyser when returning data, how to save result without newline every 8192

From: Michael Rys [MSFT] (mrys_at_online.microsoft.com)
Date: 04/18/04

  • Next message: Michael Rys [MSFT]: "Re: xml storage model in yukon"
    Date: Sun, 18 Apr 2004 00:07:42 -0700
    
    

    You can write a small VB Script using ADO that will use the ADO result
    stream to write the FOR XML result directly to a file.

    I think some code may be available at http://www.sqlxml.org.

    The Query Analyzer used ODBC, that had no streaming result support
    (Workbench in Yukon will be better) and added the line-breaks about every
    2033 characters.

    HTH
    Michael

    "Niklas E" <raven_tln0sp4m@hotmail.com> wrote in message
    news:OD44$SFJEHA.2424@TK2MSFTNGP12.phx.gbl...
    > When I run a for xml query in query analyser, the result gets split up
    > with
    > line breaks if I save it to a file. How can I save the result without
    > these
    > line-breaks? I have 185000 line-breaks in my result and that is not easy
    > to
    > replace. Try to open a 785MB in a text-editor(=coffe-break). It is the
    > result of a SP. Is there some way to save it directly to file, e.g. exec
    > SP_MyXMLData > C:\big.xml
    >
    > Best regards
    > Niklas
    >
    >


  • Next message: Michael Rys [MSFT]: "Re: xml storage model in yukon"

    Relevant Pages

    • Re: For XML Problem with IIS6 and W2k3
      ... Can you run the FOR XML query directly on the database? ... > dim adoConn ... > dialect for the command stream to be a SQL query. ...
      (microsoft.public.sqlserver.xml)
    • Re: XML , schema
      ... -8004-477098A407AC&displaylang=en) and use an annotated XSD schema. ... Here's an example that uses ADO: ... 'Create Stream object for results. ... required XML format base on an schema / mapping file? ...
      (microsoft.public.sqlserver.xml)
    • Re: Recordset load XML
      ... file, if you are using a version of ADO that supports the Stream object, you ... new Recordset ... Recordset return so I save the RecordSet to an XML string: ...
      (microsoft.public.dotnet.languages.csharp)
    • Limitations of OPENXML support in SQL Server
      ... I have spent considerable time creating an ASP page that uses ADO and a very ... complicated FOR XML EXPLICIT query to create an XML data stream and send it ... VB (using a browser control). ... Is there a way to get a file handle from this "stream" to pass to ...
      (microsoft.public.sqlserver.xml)
    • Re: FOR XML AUTO, Elements and blank cell
      ... First FOR XML results are never guaranteed to be fully well-formed (they can ... You can add a root node by setting the Root ... you need to use the correct API to get the XML back as a stream: ... Can you post the query? ...
      (microsoft.public.sqlserver.xml)