Reset the record status to DataRecordStatus.Existing

The modification status of each column is not reset.

Column values will not be reset or modified in any way.

See topic DataRecordStatus (enum) for an overview of record statuses.

This method is defined in the generated record code.

public void ResetToExisting()


A record is created, reset to DataRecordStatus.Existing, and then filled with values. Finally the record is appended to the resultset:

var record = customers.NewRecord();


record.ID = 100;

record.Firstname = "John";

record.Lastname = "Smith";


When Recordset.SaveChanges() is called, an UPDATE statement will be generated for the modified columns.

The next example shows how the set the record status of a newly created record to DataRecordStatus.ExistingDelete.

var record = customers.NewRecord(); // The new record has DataRecordStatus.New

record.ResetToExisting(); // The record status is changed to DataRecordStatus.Existing

record.ID = 100;


customers.Delete(record); // The record status is changed to DataRecordStatus.ExistingDelete

When Recordset.SaveChanges() is called, a DELETE statement will be generated for the record in the example above.

Would "customers.Delete(record)" be called on a New record, then that record would immediately be removed from the recordset, and there would be nothing to send to the database.