GetItemStatus

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 client method or UpdateData server will generate for the row or column.

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.GetItemStatus (number row, number columnNumber )
number objdwcontrol.GetItemStatus ( number row, string columnName )

Argument

Description

objdwcontrol

A reference to a Web DataWindow client control.

row

A value identifying the row for which you want the status.

column

The column for which you want the status. Column can be a column number or a column name. The column number is the number of the column as it is listed in the Column Specification view of the DataWindow painter—not necessarily the number of the column in the Design view.

Specify 0 to get the status of the whole row.

Returns

A number that identifies the status of the item at row, column of objdwcontrol:

Status

Meaning

0

The information in the row or column is unchanged.

1

The information in the column or one of the columns in the row has changed.

2

The row is new but no values have been specified for its columns. (Applies to rows only, not to individual columns.)

3

The row is new, and values have been assigned to its columns. In addition to changes caused by user entry or the SetItem method, a new row gets this status when one of its columns has a default value. (Apples to rows only, not to individual columns.)

If column is 0, GetItemStatus returns the status of row.

Usage

Use GetItemStatus to understand what SQL statements will be generated for new and changed information when you update the database.

Update generates an INSERT statement for rows with status 3. It generates an UPDATE statement for rows with status 1 and references the columns that have been affected.