dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlBlob Class / IsEmpty Property
Example

IsEmpty Property (MySqlBlob)
Gets a value indicating whether the MySqlBlob is empty or not.
Syntax
'Declaration
 
Public ReadOnly Property IsEmpty As Boolean
 

Property Value

true if the MySqlBlob is empty; otherwise, false.
Remarks
IsEmpty is true also if MySqlBlob has Null value.
Example
In this sample a Null value is assigned to a MySqlBlob instance, then some properties are checked. If unchanged, this code produces the following output:

It is empty.

It is Null.

public void MySqlBlobNullTest()
{
  MySqlBlob myBlob = new MySqlBlob();
  myBlob = MySqlBlob.Null;
  if (myBlob.CanRead)
  {
    Console.WriteLine("It can read.");
  }
  if (myBlob.CanWrite)
  {
    Console.WriteLine("It can write.");
  }
  if (myBlob.CanSeek)
  {
    Console.WriteLine("It can seek.");
  }
  if (myBlob.IsEmpty)
  {
    Console.WriteLine("It is empty.");
  }
  if (myBlob.IsNull)
  {
    Console.WriteLine("It is Null.");
  }
}
Public Sub MySqlBlobNullTest()
  Dim myBlob As MySqlBlob = New MySqlBlob
  myBlob = MySqlBlob.Null
  If myBlob.CanRead Then
    Console.WriteLine("It can read.")
  End If
  If myBlob.CanWrite Then
    Console.WriteLine("It can write.")
  End If
  If (myBlob.CanSeek) Then
    Console.WriteLine("It can seek.")
  End If
  If myBlob.IsEmpty Then
    Console.WriteLine("It is empty.")
  End If
  If myBlob.IsNull Then
    Console.WriteLine("It is Null.")
  End If
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also