DataSet.Clear Method ()

 

Clears the DataSet of any data by removing all rows in all tables.

Namespace:   System.Data
Assembly:  System.Data (in System.Data.dll)

member Clear : unit -> unit

If the DataSet is bound to an XmlDataDocument, calling DataSet.Clear or DataTable.Clear raises the NotSupportedException. To avoid this situation, traverse each table, removing each row one at a time.

The following example clears the DataSet of all rows in all tables.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: