You can manage the pending state.
// load the customer MBO with customer ID 100 Customer customer = Customer.FindByPrimaryKey(100); // Change phone number of that customer customer.Phone = "8005551212"; // use one transaction to do save and submitPending Sybase.Persistence.LocalTransaction tx = SMP101DB.BeginTransaction(); try { customer.Save(); customer.SubmitPending(); tx.Commit(); } catch (Exception e) { tx.Rollback(); }
Customer customer = Customer.FindByPrimaryKey(101); if(errorHappened) { Customer.CancelPending(); } else { customer.SubmitPending(); }