ModifiedCount method (DataWindows)
Description
Reports the number of rows that have been modified but not
updated in a DataWindow or DataStore.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Web |
Client contol, server component |
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder and Web DataWindow server component]
1 |
long <span>dwcontrol</span><span>.ModifiedCount</span> ( ) |
[Web DataWindow client control and Web ActiveX]
1 |
number <span>dwcontrol</span><span>.ModifiedCount</span> ( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, |
Return Values
Returns the number of rows that have been modified in the
primary buffer. 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, in PowerBuilder
and JavaScript 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:
1 |
long ll_Rows |
1 |
ll_Rows = dw_Employee.<span>ModifiedCount</span>() |
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:
1 |
IF dw_employee.<span>ModifiedCount</span>() <span>></span> 0 THEN & |
1 |
dw_employee.Update() |