RecordSet.Field

From Xojo Documentation

Method

RecordSet.Field(Name as String) As DatabaseField

Supported for all project types and targets.

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

Example

Get the string value of a column in a RecordSet:

// rs is a RecordSet with a string column called "ProductName"
Dim productName As String
productName = rs.Field("ProductName").StringValue

Set the string value of a column in a RecordSet:

// rs is a RecordSet with a string column called "ProductName":
rs.Edit
rs.Field("ProductName").StringValue = "Generic Widgets"
rs.Update