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

DeleteRow – PB Docs 2019 – PowerBuilder Library

DeleteRow – PB Docs 2019

DeleteRow

method (DataWindows)

Description

Deletes a row from a DataWindow control, DataStore object, or child
DataWindow.

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.

row

A value identifying the row you want to delete. To
delete the current row, specify 0 for row.

Return value

Returns 1 if the row is successfully deleted and -1 if an error
occurs.

If any argument’s value is null, in PowerBuilder and JavaScript the
method returns null. If there is no DataWindow object assigned to the
DataWindow control or DataStore, this method returns -1.

Usage

DeleteRow deletes the row from the DataWindow’s primary
buffer.

If the DataWindow is not updatable, all storage associated with the
row is cleared. If the DataWindow is updatable, DeleteRow moves the row to
the DataWindow’s delete buffer; PowerBuilder uses the values in the delete
buffer to build the SQL DELETE statement.

The row is not deleted from the database table until the application
calls the Update method. After the Update method has updated the database
and the update flags are reset, the storage associated with the row is
cleared.

Apply GetChanges after deleting rows in a distributed
application

If a DataWindow or data store is populated using SetChanges or
SetFullState, and an Update is done that includes deleted rows, the
deleted rows remain in the delete buffer until a subsequent GetChanges
is applied to the DataWindow or data store.

Examples

This statement deletes the current row from dw_employee:

These statements delete row 5 from dw_employee and then update the
database with the change:

See also

DeletedCount

InsertRow


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