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 block of rows and columns – PB Docs 2019 – PowerBuilder Library

Syntax for data in a block of rows and columns – PB Docs 2019

Syntax for data in a block of
rows and columns

Description

A DataWindow data expression accesses data in a range of rows and
columns when you specify the starting and ending row and column
numbers.

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.

startrownum

The number of the first row in the desired range of
rows.

startcolnum

The number for the first column in the
range.

endrownum

The number of the last row in the
range.

endcolnum

The number for the last column in the
range.

The row and column numbers must be enclosed
in brackets and separated by commas.

Return value

The datatype of the expression is Any. The expression returns an
array of structures or user objects. There is one structure element or
user object instance variable for each column in the designated range.
The datatype of each element matches the datatype of the corresponding
column. There is one structure or user object in the array for each row
in the range of rows.

Usage

When you specify a block, the expression always returns an array
and you must assign the result to an array, even if you know there is
only one structure in the result.

This expression returns an array of one structure from row
22:

This expression returns an array of one value from row 22, column
1:

Examples

These statements both refer to data in the first ten rows and
first four columns of the DataWindow object in the control dw_1. The
primary buffer and current data are the default:

This example gets employee IDs and last names for all the rows in
the delete buffer. The IDs and names are the first two columns. It saves
the information in a structure, called str_namelist, of two elements: an
integer called id and a string called lastname. The structure was
defined previously in the Structure painter. The list of IDs and names
is then saved in the file DELETED.TXT:

Using the structure from the previous example that holds IDs and
last names, this example sets all the IDs and last names in the
DataWindow control to null:


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