DB2®ResultSet.IsDeleted Property

Gets a value indicating if the row has been deleted.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Property IsDeleted As Boolean
[C#]
public bool IsDeleted {get;}
[C++]
public: __property bool get_IsDeleted();
[JScript]
public function get IsDeleted() : Boolean;

Example

[C#] The following example demonstrates how to delete a row from a DB2ResultSet instance, provided the server supports updatable cursors.

[C#]
  public static void deleteSalesData(DB2Connection conn)
  {
    string salesQuery = "SELECT * FROM SALES";
    DB2Command cmd = new DB2Command(salesQuery, conn);
    DB2ResultSet salesRS = cmd.ExecuteResultSet(
      DB2CursorType.Keyset);

    if (salesRS.ReadLast())
    {
      if (salesRS.Updatable)
      {
        salesRS.Delete();
        MessageBox.Show(salesRS.IsDeleted.ToString());
      }
    }

    return;
  }