|
Allowing the use of noncontiguous memory to represent a very large binary or text value, such as a video clip or a large document, improves performance, functionality, and scalability.
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 PsqlParameter object to a specific instance of the stream (see PsqlParameter Object ). When the command is executed, the data provider reads from the stream to extract the value.
See Inserting Data Into LONGVARCHAR and LONGVARBINARY Columns for a code example on inserting data into LONGVARCHAR and LONGVARBINARY columns using randomly generated data. The sample also shows how to use streaming objects as inputs to LONGVARCHAR and LONGVARBINARY columns.
|
Chapter contents
Prev topic: Data Types
|