Sets a new value for a specific column with the data type string.

Syntax

XIH.SetString(colcaption, value)
XIH.SetString(colcaption, offset, value)
XIH.SetString(colIndex, value)
XIH.SetString(colIndex, offset, value)

Parameters

Parameter

Data type

Description

Sample

colcaption

string

String specifies the columns caption.

"col1"

colIndex

int

Index of a column

1

offset

int

Optionally specifies the row offset. Default is 1

1

value

string

The new value that will replace the old one

"I am a string"

Remarks

ColumnIndex is zero-based.

A statement with an offset returns 'false' after reaching the end of the column due to the offset.

Returns a boolean.

Examples

For this example to work you need an existing column "Key" that is filled with strings and an existing column "Id" with the data type string that will be filled with the results.

XIH.SetString("Id", #Key#)

Writes into column "Id" the value of column "Key".


XIH.SetString("Id", 2, #Key#)

Writes into column "Id" the current value of column "Key" offset by 2 rows.

Returns 'false' after reaching the end of the table due to the offset.