Update Operation

The Update operation updates a record in the local database on the device. To execute update operations on an MBO, get an instance of the MBO, set the MBO attributes, then call either the Save() or Update() operation. To propagate the changes to the server, call SubmitPending.

Customer cust = Customer.FindByPrimaryKey(101);
cust.Fname = "supAdmin";
cust.Company_name = "Sybase";
cust.Phone = "777-8888";
cust.Update();// or cust.Save();
cust.SubmitPending();

To update multiple MBOs in a relationship, if the relationship is a composite, call submitPending() on the parent MBO. If the relationship is not a composite, call submitPending() on each MBO within the relationship:

Customer cust = Customer.FindByPrimaryKey(101);
Sybase.Collections.GenericList<SalesOrder> orders = cust.Orders;
SalesOrder order = orders[0];
order.Order_date = DateTime.Now;
order.Save();
cust.SubmitPending();