.

reading a blob out of a datareader

if (!(dataReader[dataReader.GetOrdinal("file_data")] is System.DBNull))
{
    Byte[] blob = new Byte[(dataReader.GetBytes(dataReader.GetOrdinal("file_data"), 
               0, null, 0, int.MaxValue))];
    long bufferSize = dataReader.GetBytes(dataReader.GetOrdinal("file_data"), 0, blob, 
               0, blob.Length);
    objectToPopulate.file_data = blob;
}

What's your thoughts on this?

*

Protected by WP Anti Spam