Save¶
Saves changes made to the data table to the database. For bulk persistence, apply row changes in memory and call Save once after the loop.
1 | |
Returns¶
The current DataTable instance.
Remarks¶
Until the DataTable.Save method is called, all changes to the data table are stored in memory. The Save method flushes all changes to the database. For batch insert/update, obtain the table once, apply row changes in memory, then call Save once after the loop. Do not call $Database.EnsureData in that loop: it saves each call immediately. A single Save invocation does not imply a single SQL statement; the provider controls persistence batching.
Scan all rows and update the name of the groups¶
1 2 3 4 5 6 7 8 9 10 11 12 | |
Upsert a collection with stable source IDs and one Save call¶
Directory.Contact must define Id, DisplayName and Xml columns. Each source Contact must already have a non-empty stable Id.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |