TABLE Statement

Purpose

Defines a variable which is a collection of related data. The variable contains a set of rows and columns including a row of column headers describing the fields in each row. A table statement can only be in a DEFINE statement or block.

When a TABLE variable is referenced while executing an HTML block, Net.Data displays the content of the table as either a plain character table or, if the DTW_HTML_TABLE variable is set to YES, as an HTML table. When a TABLE variable is referenced while executing an XML block, Net.Data returns the table as a RowSet.

Syntax

>>-%TABLE--| upper limit |-------------------------------------><
 
upper limit
 
|---+--------------------+--------------------------------------|
    '-(--+-number-+---)--'
         '-ALL----'
 

Values

%TABLE
A keyword that specifies the definition of a collection of related data containing an array of identical records, or rows, and an array of column names describing the fields in each row.

upper limit
The number of rows that can be contained in the table. If the upper limit value is not specified, the table can contain an unlimited number of rows.

number
A string of digits. A value of 0 allows for unlimited number of rows in the table.

ALL
A keyword that allows for an unlimited number of rows in the table.

Context

The TABLE statement can be found in these contexts:

Restrictions

The TABLE statement can contain these elements:

Examples

Example 1: A Net.Data table with an upper limit of 30 rows

%DEFINE myTable1=%TABLE(30)

Example 2: A Net.Data table that uses the default of all rows

%DEFINE myTable2=%TABLE

Example 3: A Net.Data table that specifies all rows

%DEFINE myTable3=%TABLE(ALL)


[ Top of Page | Previous Page | Next Page | Index ]