How to read a “tCompressedString(varbinary(max))” fieldvalue from a SharePoint content database

this blog helped me to find the solution:

a snippet from my code:

using System.IO.Compression;

SqlBytes bytes = sqlDataReader.GetSqlBytes(sqlDataReader.GetOrdinal(“xmlFields”));
Stream stream = bytes.Stream;
for (int i = 0; i < 14; i++)
DeflateStream deflateStream = new DeflateStream(stream, CompressionMode.Decompress, true);
StreamReader reader = new StreamReader(deflateStream);
string fields = reader.ReadToEnd();

This entry was posted in Geen categorie and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s