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

Syntax for data in a single row or all rows – PB Docs 150 – PowerBuilder Library

Syntax for data in a single row or all rows – PB Docs 150

Syntax for data in a single row or all rows

Description

A DataWindow data expression accesses a single row when you
specify the row number. It accesses all the data in the DataWindow
control when you omit the row number.

Syntax

Parameter

Description

dwcontrol

The name of the DataWindow control or
child DataWindow in which you want to get or set data.

buffer
(optional)

The name of the buffer from which you
want to get or set data. Values are:

  • Primary – (Default)
    The data in the primary buffer (the data that has not been deleted
    or filtered out).

  • Delete – The data in the delete buffer
    (data deleted from the DataWindow control).

  • Filter – The data in the filter buffer
    (data that was filtered out).

datasource
(optional)

The source of the data. Values are:

  • Current – (Default)
    The current values in the DataWindow control.

  • Original – The values that were initially
    retrieved from the database.

rownum
(optional)

The number of the row you want to access.

To access data for all rows, omit rownum.

The row number must be enclosed in brackets.

Return value

The datatype of the expression is Any. The expression returns
one structure or user object (for a single row) or an array of them
(for all rows). There is one structure element or instance variable
for each column in the DataWindow object. The datatype of each element
matches the datatype of the corresponding column.

Usage

When you omit the row number, the expression always returns
an array, and you must assign the result to an array, even if you
know there is only one row in the DataWindow control.

Examples

These statements both access current data for row 5 in the
primary buffer in the DataWindow object contained in the DataWindow
control dw_1:

This example assigns all the data in dw_1 to the
Any variable la_dwdata. The value assigned to la_dwdata
is an array of data structures whose members match the column datatypes:

This example assigns all the data in the delete buffer for
dw_1 to the Any variable la_dwdata:

This example replaces all the data in the nested report in
row 2 with data from dw_2. The columns in the DataWindow
object in dw_2 must match the columns in the DataWindow
object for the nested report:


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