Marc,
You can do this by passing the SequentialAccess value from the
CommandBehavior enumeration to the ExecuteReader method on your command.
Once you do that, you can call GetBytes or GetChars to access the data for
the field as a progressive stream (you have to access the columns in order,
btw), as opposed to all at once.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>> If you want to write it as a stream, then why are you putting it into an
>> XmlReader in the first place?
[quoted text clipped - 10 lines]
>
> Marc
Marc Gravell - 10 Jul 2007 05:02 GMT
Interesting - I'll give that a go. I've used that approach with BLOBs
(and (less often) CLOBs), but I haven't (to date) used it with the xml
data-type. Cheers.
Marc
Marc Gravell - 10 Jul 2007 11:31 GMT
(for the list's benefit)
Nicholas is quite correct; I've changed my code to use a fixed char[]
buffer, ExecuteReader(), and GetChars(), writing the appropriate
buffer-portion to the Stream via a StreamWriter and the .Write(char[],
int, int) overload. All is now well (and a little quicker I think,
presumably due to ExecuteXmlReader() having to parse the stream).
Thanks.
Marc