Any errors will be placed into o.cErrorMsg and o.lError will be true
If the property o.lusetransactions is set to true then the object will use the Transaction mode
when saving the data.
The steps in the process are as follows;
First it performs any special functions on the PK field to make sure it's formated correctly.
It does this by looking in o.cpkexpression. If there is an expression here then it
saves the PK value to a variable called lcPKValue and then Evaluate(o.cpkexpression).
Then if Empty(o.odata.&lcPKfield) And o.lcreateidonsave = True the function will
Create a ne PK value by replacing the PK field with the value returned
by o.createnewid()
Then if not Empty(o.cparentfield) and not Empty(o.cparentvalue) the value
o.cparentvalue will be placed into the parent field in o.oData.
Then it loads the record in the table for the PK value so that it can determine what has
been chaged by the user. It goes through all fields and sets this.ldatachanged to True
If any of the fields in o.oData are different to whats in the tabel. Despite the
resulting value the record will be saved.
Then if o.lusetransactions = True a Transaction is started so that all can be rolled back
Then o.updatelastmodified() is called. This places a date time stamp in
o.oData
Then if o.lvalidateonsave = True the o.Validate() method is called
Then if the table o.cAlias is in use it performs a TableUpdate() on it
Then if all the above has returned True the Transaction is committed. There
On each of the above to make sure if it returns false the transaction is
RolledBack and control returned at that point.
Then if all the above returns True and o.lpostsavelogic = True the
method o.postsavelogic() is called. Remember at this point that
the data has been saved so nothing can be rolled back if this fails.
This method is just for ancillary data functions associated with this
data being saved.
o.Save()