Description
Reports the number of rows that have been modified but not updated in a DataWindow or DataStore.
Applies to
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore object |
Syntax
PowerBuilder
long dwcontrol.ModifiedCount ( )
Return value
Returns the number of rows that have been modified in the primary and filter buffers. Returns 0 if no rows have been modified or if all modified rows have been updated in the database table. Returns -1 if an error occurs.
If dwcontrol is null, the method returns null.
Usage
ModifiedCount reports the number of rows that are scheduled to be added or updated in the database table associated with a DataWindow or DataStore. This includes rows in the primary and filter buffers.
A newly inserted row (with a status flag of New!) is not included in the modified count until data is entered in the row (its status flag becomes NewModified!).
The DeletedCount method counts the number of rows in the deleted buffer. The RowCount method counts the total number of rows in the primary buffer.
Examples
If five rows in dw_Employee have been modified but not updated in the associated database table or filtered out of the primary buffer, the following code sets ll_Rows equal to 5:
long ll_Rows ll_Rows = dw_Employee.ModifiedCount()
If any rows in dw_Employee have been modified but not updated in the associated database table, this statement updates the database table associated with the dw_employee DataWindow control:
IF dw_employee.ModifiedCount() > 0 THEN & dw_employee.Update()
See also