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

SetActionCode – PB Docs 150 – PowerBuilder Library

SetActionCode – PB Docs 150

SetActionCode method (DataWindows)

Description

Sets the action code for an event in a DataWindow control.
The action code determines the action that PowerBuilder takes following
the event. The default action code is 0.

note.png Where to use SetActionCode

SetActionCode is obsolete in PowerBuilder.
To return a value, include a RETURN statement
in the event script using the return codes documented for that event.

For the Web ActiveX, use SetActionCode for
event return values.

Controls

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

[PowerBuilder]

[Web ActiveX]

Argument

Description

dwcontrol

A reference to a DataWindow control or
child DataWindow.

code

A value specifying the action you want
to take in the DataWindow control. The meaning of the action code
depends on the event.

Return Values

Returns 1 if it succeeds and –1 if an error occurs.
If any argument’s value is null, SetActionCode returns
null.

Usage

Use SetActionCode to change the action
that occurs following a DataWindow event. Not all DataWindow events
have action codes, only those events that can have different outcomes.

note.png SetActionCode last statement in script

Although SetActionCode is not required
to be the last statement in a script, it may not perform as expected
if other statements follow it.

Examples

In the ItemChanged event script for dw_Employee,
these statements set the action code in dw_Employee to
reject data that is less than the employee’s age:

This example shows a script for the DBError event
script that displays a version of the error message to the user.
Because PowerBuilder also displays a message to the user after the
event, the script calls SetActionCode to set
the action code to 1, which suppresses the PowerBuilder error message:


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