Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Handling Large Object (LOB) Parameters in the CLR

Use SqlBytes and SqlChars to pass large object (LOB) binary type (varbinary(max)) and LOB character type (nvarchar(max)) parameters, respectively. These types allow streaming the LOB values from the database to the common language runtime (CLR) routine, instead of copying the entire value into managed space. SqlBinary and SqlString should be used only for small binary and character string values.

For an example of how to handle large objects, see the sample on CodePlex; see SQL Server Database Engine Samples for more information.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft