Exception | Description |
---|---|
System.InvalidCastException | The stream is null when the TdBlob is a DBNull. |
System.ObjectDisposedException | The TdBlob is closed / disposed. |
public void long GetEmployeePictureSize(String employeeId, TdConnection cn) { long pictureSize = 0; // retrieve the picture TdBlob picture = GetEmployeePicture(employeeId, cn); if (false == picture.IsNull) { pictureSize = picture.BaseStream.Length; } // Close the TdBlob to release resources picture.Close(); // return the size return pictureSize; }
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019