RowSet.Column

From Xojo Documentation

Method

RowSet.Column(name as String) As DatabaseColumn

New in 2019r2

Supported for all project types and targets.

Returns a DatabaseColumn containing information about the column (specified by Name) from the current position in the RowSet.

Notes

If the column name does not exist, an InvalidArgumentException is raised.

Example

Get the string value of a column in a RowSet:

// rs is a RowSet with a column called "ProductName"
Var productName As String
productName = rs.Column("ProductName").StringValue

Set the string value of a column in a RowSet:

// rs is a RowSet with a column called "ProductName":
rs.EditRow
rs.Column("ProductName").StringValue = "Generic Widgets"
rs.SaveRow