AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
X | X |
| X | X | X |
| X | X |
Purpose
Inserts one or more rows into a Net.Data table.
Format
@DTW_TB_INSERTROW(table, after_row, rows)
Parameters
Table 148. DTW_TB_INSERTROW Parameters
Data Type | Parameter | Use | Description |
---|---|---|---|
table | table | INOUT | The macro table variable into which rows are to be inserted. |
integer | after_row | IN | The number of the row after which new rows are inserted. To insert rows at the beginning of the table, specify 0. |
integer | rows | IN | The number of rows to insert into table. |
Return Codes
Table 149. DTW_TB_INSERTROW Return Codes
Return Code | Explanation |
---|---|
-1001 | The server could not process a Net.Data request to allocate memory. |
1001 | An input parameter contained a NULL value. |
1003 | An incorrect number of parameters were passed on a function call. |
1004 | A parameter passed on a function call, required to be a Net.Data macro table variable, was of a different variable type. |
1005 | A parameter passed on a function call, required to be a string variable, was of a different variable type. |
1007 | A parameter contains a value which is not valid. |
1008 | A parameter is outside of table bounds. |
Usage Notes
Before calling DTW_TB_INSERTROW(), set the number of columns in the table. You can set the number of columns with the DTW_TB_SETCOLS() or DTW_TB_INSERTCOL() functions, or by passing the table to a language environment to be set.
Examples
Example 1: Inserts a row after row five of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTROW(myTable, "5", "1")
Example 2: Inserts three rows at the start of a table
%DEFINE myTable = %TABLE @DTW_TB_INSERTROW(myTable, "0", "3")