2 Using the Data Providers : Using Streams as Input to Long Data Parameters

Using Streams as Input to Long Data Parameters
Allowing the use of non contiguous memory to represent a very large binary or text value improves performance, functionality, and scalability. Stream objects are useful when processing a video clip, a large text, or, for the DB2 and Oracle data providers, an XML document. See “Returning and Inserting/Updating XML Data in DB2” and “Returning and Inserting/Updating XML Data in Oracle” for more information.
Stream objects used to read binary data are derived from the System.IO.Stream object and use the Framework data type of byte[]:
Stream objects used to read text data are derived from the System.IO.TextReader object and use the Framework data type of string:
To enable the use of streams, you set the Value property of the data provider’s Parameter object to a specific instance of the stream (see Appendix C “.NET Classes”). When the command is executed, the data provider reads from the stream to extract the value.