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

Reset – PB Docs 125 – PowerBuilder Library

Reset – PB Docs 125

Reset method (DataWindows)

Description

Clears all the data from a DataWindow
control or DataStore object.

For the syntax to use for deleting graphs
within a DataWindow object that have an external data source, see Reset. For the syntax
to use with other PowerBuilder controls, see Reset in
the PowerScript Reference.

Controls

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore
object

Web

Server component

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

[PowerBuilder]

[Web DataWindow server component]

[Web ActiveX]

Argument

Description

dwcontrol

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

Return Values

Returns 1 if it succeeds and –1 if an error occurs.
The return value is usually not used.

If dwcontrol is null, in PowerBuilder
and JavaScript the method returns null.

Usage

Reset is not the same as deleting rows
from the DataWindow object or child DataWindow. Reset affects
the application only, not the database. If you delete rows and then
call the Update method, the rows are deleted
from the database table associated with the DataWindow object. If
you call Reset and then call Update,
no changes are made to the table.

note.png PowerBuilder environment

If you call Reset when the Retrieve As
Needed option is set, Reset will clear the rows
that have been retrieved. However, because Retrieve As Needed is
on, the DataWindow immediately retrieves the next set of rows.

To prevent the rows from being retrieved, call DBCancel before
calling Reset. If all the rows have been retrieved
(the cursor has been closed and the RetrieveEnd event has occurred),
then when Reset clears the DataWindow, it stays
empty.

Examples

This statement completely clears the contents of
dw_employee:

In a DataWindow whose Retrieve As Needed option is
on, this example cancels the retrieval before resetting the DataWindow:

See Also


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