Deleting Data using Business Objects

There are several overloads of the Delete() method that allow you to delete records in a business object's DataSet.

  • Deletes the specified DataRow

    protected internal virtual bool DeleteRow(DataRow dr)
    

  • Deletes the nth record in the specified DataSet's specified DataTable

    public virtual bool Delete(DataSet ds, string tableName, int row)
    

  • Deletes the nth record in the specified DataSet's default DataTable

    public virtual bool Delete(DataSet ds, int row)
    

  • Deletes the first record in the current DataSet's specified DataTable

    public virtual bool Delete(string tableName)
    

  • Deletes the first record in the current DataSet's default DataTable

    public override bool Delete()
    

  • Deletes the record with the specified primary key value in the specified table

    public virtual bool Delete(object primaryKeyValue, string tableName)
    

  • Deletes the specified row in the current DataSet

    public virtual bool Delete(DataRowView drView)
    

  • Deletes the record with the specified primary key values in the specified table

    public virtual bool Delete(object[] primaryKeyValues, string tableName)
    

    Example in C#:

    object[] KeyValues = new object[] { 1001, 16 };
    orderDetail.Delete(KeyValues, "OrderDetail");

    In VB .NET:

    Dim KeyValues() As Object = {1001, 16}
    orderDetail.Delete(KeyValues, "OrderDetail")

  • Deletes the record with the specified primary key value in the default table

    public virtual bool Delete(object primaryKeyValue)
    

  • Deletes the record with the specified primary key values in the default table

    public virtual bool Delete(object[] primaryKeyValues)
    


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 07/28/18
Comment or report problem with topic