Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: creating XML feed >Thread Next - Re: creating XML feed Re: creating XML feedTo: NULL Date: 9/11/2007 12:59:00 PM
"Martin Honnen" <mahotrash@y...> wrote in message
news:OllImDJ9HHA.3716@T......
> shank wrote:
>
>> I'm using that statement to generate the XML code. I'm trying to generate
>> that code then pass to our users out of convenience for them. However,
>> the size of the generated code is HUGE and I'm having problems making it
>> a convenient download. Once I get it into a database field, it's so large
>> that browsers timeout trying to access it.
>
> Not sure how you do it but "get it into a database field" sounds strange,
> you should use the ExecuteXmlReader method of an SqlCommand object (with
> e.g. SELECT col1, col2, ..., col2 FROM table FOR XML AUTO, ROOT), then if
> you want to pass on that XML within an ASP.NET page to a browser you
> should do e.g.
> using (XmlReader xmlReader = sqlCommandInstance.ExecuteXmlReader())
> {
> Response.ContentType = "application/xml";
> using (XmlWriter xmlWriter = XmlWriter.Create(Response.Output))
> {
> xmlWriter.WriteNode(xmlReader, false);
> }
> }
> That way the XML should be streamed from SQL Server to ASP.NET and from
> ASP.NET to the browser. Might need to turn off ASP.NET output buffering.
>
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
===================================
I'm using ASP classic.
I assume ASP classic offers streaming as well, correct?
thanks
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
