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

Techniques for accessing data – PB Docs 150 – PowerBuilder Library

Techniques for accessing data – PB Docs 150

Techniques for accessing data

Two techniques

There are two ways to access data values in a DataWindow control:

  • Methods

    SetItem and the group of GetItem methods
    access single values in specific rows and columns. For example:

  • Expressions

    DataWindow data expressions use dot notation and can refer
    to single items, columns, blocks of data, selected data, or the
    whole DataWindow control. For example:

Both methods allow you to access data in any buffer and to
get original or current values.

Which technique to use

The technique you use depends on how much data you are accessing
and whether you know the names of the DataWindow columns when the
script is compiled:

Table 4-1: Which technique to use when accessing data

If you
want to access

Use

A single item

Either an expression or a method. Both
are equally efficient when referring to single items.

note.png Exception

If you want to use a column’s name rather than its
number, and the name is not known until runtime, use a method; methods
allow you to name the column dynamically.

More than one item, such as:

  • All the data in a column

  • A block of data specified by ranges of rows and
    columns

  • Data in selected rows

  • All the data in the DataWindow

An expression. Specifying the data you
want in a single statement is much more efficient than calling the
methods repeatedly in a program loop.

What’s in this section

The rest of this section describes how to construct expressions
for accessing DataWindow data. The section “Syntaxes for DataWindow
data expressions “
provides reference
information on the syntaxes for data expressions.

For information on methods

For information about using methods for accessing data, see SetItem, GetItemDate, GetItemDateTime, GetItemDecimal, GetItemNumber, GetItemString, and GetItemTime in Chapter 9, “Methods for the DataWindow Control.”


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