About return values for DataWindow events – PB Docs 150

About return values for DataWindow events

The way to specify a return code in a DataWindow event is
different in each of the DataWindow environments.

PowerBuilder

Use a RETURN statement as the last statement
in the event script. The datatype of the value is long.

For example, in the ItemChanged event, set the return code
to 2 to reject an empty string as a data value:

Web DataWindow

In client events, use a return statement as the last statement
in the event script. The datatype of the value is number.

For example, in the ItemChanged event, set the return code
to 2 to reject an empty string as a data value:

Web ActiveX

Use the SetActionCode method of the Web
ActiveX control. The datatype of the value is number.

For example, in the DBError event, suppress the standard error
message by setting the return code to 1:

Java

Use the setReturnCode method of the event
object passed to the event. The datatype of the value is int. The setReturnCode method
is inherited from the parent EventData class.

For example, in the retrieveStart event, prevent the DataWindow
from being reset, so that the newly retrieved rows as appended to
the rows already retrieved:


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