Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DeletedCount – PB Docs 2021 – PowerBuilder Library

DeletedCount – PB Docs 2021

DeletedCount

method (DataWindows)

Description

Reports the number of rows that have been marked for deletion in the
database.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore
object

Syntax

PowerBuilder

Argument

Description

dwcontrol

A reference to a DataWindow control, DataStore, or
child DataWindow

Return value

Returns the number of rows that have been deleted from dwcontrol but
not updated in the associated database table.

Returns 0 if no rows have been deleted or if all the deleted rows
have been updated in the database table. DeletedCount returns -1 if it
fails.

If any argument’s value is null, in PowerBuilder and JavaScript the
method returns null.

Usage

An updatable DataWindow control or DataStore has several buffers.
The primary buffer stores the rows currently being displayed. The delete
buffer stores rows that the application has marked for deletion by calling
the DeleteRow method. These rows are saved until the database is updated.
You can use DeletedCount to find out if there are any rows in the delete
buffer.

If a DataWindow is not updatable, rows that are deleted are
discarded — they are not stored in the delete buffer. Therefore,
DeletedCount returns 0 for a nonupdatable DataWindow unless a method, such
as RowsCopy or RowsMove, has been used to populate the delete
buffer.

Examples

Assuming two rows in dw_employee have been deleted but have not been
updated in the associated database table, these statements set ll_Del to
2:

This example tests whether there are rows in the delete buffer, and
if so, updates the database table associated with dw_employee:

See also

DeleteRow

FilteredCount

ModifiedCount

RowCount


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x