GetItemStatus method (DataWindows)
Description
Reports the modification status of a row or a column within
a row. The modification status determines the type of SQL statement the Update method
will generate for the row or column.
A separate method name is provided as an alternative syntax
for the Web DataWindow server component, which cannot use overloaded
methods.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, DataStore |
Web |
Client control, server component |
Web ActiveX |
DataWindow control, DataWindowChild object |
Syntax
[PowerBuilder]
1 |
DWItemStatus <span>dwcontrol</span>.<span>GetItemStatus</span> ( long <span>row</span>, integer <span>column</span>,<br> DWBuffer <span>dwbuffer</span> )<br>DWItemStatus <span>dwcontrol</span>.<span>GetItemStatus</span> ( long <span>row</span>, string <span>column</span>,<br> DWBuffer <span>dwbuffer</span> ) |
[Web DataWindow client control]
1 |
number <span>dwcontrol</span>.<span>GetItemStatus</span> (number <span>row</span>, number <span>column</span> ) |
1 |
number <span>dwcontrol</span>.<span>GetItemStatus</span> ( number <span>row</span>, string <span>column</span> ) |
[Web DataWindow server component]
1 |
string <span>dwcontrol</span>.<span>GetItemStatus</span> (long <span>row</span>, string <span>column</span>,<br> string <span>dwbuffer</span>)<br>string <span>dwcontrol</span>.<span>GetItemStatusByColNum</span> ( long <span>row</span>, short <span>column</span>,<br> string <span>dwbuffer</span> ) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>GetItemStatus</span> (number <span>row</span>, number <span>column</span>,<br> number <span>dwbuffer</span> )<br>number <span>dwcontrol</span>.<span>GetItemStatus</span> ( number <span>row</span>, string <span>column</span>,<br> number <span>dwbuffer</span> ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, |
row |
A value identifying the row for which |
column |
The column for which you want the status. Column can Specify 0 to get the status of the whole row. |
dwbuffer |
A value identifying the DataWindow buffer |
Return Values
A value of the dwItemStatus enumerated datatype (PowerBuilder)
or an integer (Web ActiveX and server-side Web DataWindow controls)
or a string (Web DataWindow client control). The return value identifies
the status of the item at row, column of dwcontrol in dwbuffer.
For a list of status values, see DWItemStatus.
If column is 0, GetItemStatus returns the
status of row. If there is no DataWindow object
assigned to the DataWindow control or DataStore, GetItemStatus returns
null.
If any argument value is null, in PowerBuilder and JavaScript
the method returns null.
Usage
Use GetItemStatus to understand what SQL statements will be generated for
new and changed information when you update the database.
For rows in the primary and filter buffers, Update generates
an INSERT statement for rows with NewModified!
status. It generates an UPDATE statement for
rows with DataModified! status and references the columns that have
been affected.
For rows in the delete buffer, Update does
not generate a DELETE statement for rows whose
status was New! or NewModified! before being moved to the delete
buffer.
Examples
These statements store in the variable l_status
the status of the column named emp_status in row 5 in the
filter buffer of dw_1:
1 |
dwItemStatus l_status |
1 |
l_status = dw_1.<span>GetItemStatus</span>(5, "emp_status", & |
1 |
Filter!) |
These statements store in the variable l_status
the status of the column named Salary in the current row in the
primary buffer of dw_emp:
1 |
dwItemStatus l_status |
1 |
l_status = dw_emp.<span>GetItemStatus</span>( & |
1 |
dw_emp.GetRow(), "Salary", Primary!) |