To roll back and remove new records when an error occurs while writing a record to a database table, complete the following steps: