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

Optimizing expressions for DataWindow and external objects – PB Docs 100 – PowerBuilder Library

Optimizing expressions for DataWindow and external objects – PB Docs 100

Optimizing expressions for DataWindow and external objects

No compiler validation for container objects

When you use dot notation to
refer to a DataWindow object in a DataWindow control or DataStore,
the compiler does not check the validity of the expression:

Everything you specify after the Object property passes the
compiler and is checked during execution.

The same applies to external OLE objects. No checking occurs
until execution:

Establishing partial references

Because of the runtime syntax checking, using many expressions
like these can impact performance. To improve efficiency when you
refer repeatedly to the same DataWindow component object or external
object, you can define a variable of the appropriate type and assign
a partial reference to the variable. The script evaluates most of
the reference only once and reuses it.

The datatype of a DataWindow component object is DWObject:

The datatype of a partially resolved automation expression
is OLEObject:

Handling errors

The Error and (for automation) ExternalException events are
triggered when errors occur in evaluating the DataWindow and OLE
expressions. If you write a script for these events, you can catch
an error before it triggers the SystemError event. These events
allow you to ignore an error or substitute an appropriate value.
However, you must be careful to avoid setting up conditions that
cause another error. You can also use try-catch blocks to handle
exceptions as described in “Exception handling in PowerBuilder”.

For information

For information about DataWindow data expressions and property
expressions and DWObject variables, see the DataWindow
Reference

. For information about using OLEObject variables
in automation, see Chapter 19, “Using OLE in an Application .”


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