DeleteAll
Marks all rows in the data table as deleted.
| myDataTable.DeleteAll():DataTable
|
Returns
The current DataTable instance.
Rows are not deleted instantly. To delete them from the database, call DataTable.Save.
Examples
Replace all rows of an order
1
2
3
4
5
6
7
8
9
10
11
12
13 | var lines = $Database.GetData('Sales', 'OrderLines', 'OrderId', $Xml.Evaluate('Id'));
lines.DeleteAll();
$Xml.SelectAll('Lines/Line', function (line) {
lines.Add({
Id : NewId(),
OrderId : $Xml.Evaluate('Id'),
Product : line.Evaluate('Product')
});
});
lines.Save();
|
See Also