DatabaseRecord.FieldName

From Xojo Documentation

Method

DatabaseRecord.FieldName(idx As Integer) As String

Supported for all project types and targets.

Returns the name of the field in the DatabaseRecord specified by idx. The fields are in a 0-based array.

Sample Code

Creates a new row in the team table:

Dim row As New DatabaseRecord

row.Column("Name") = "Penguins"
row.Column("Coach") = "Bob Roberts"
row.Column("City") = "Boston"

myDB.InsertRecord("Team", row)

If myDB.Error Then
MsgBox("DB Error: " + myDB.ErrorMessage)
Else
MsgBox("Field 2 Name: " + row.FieldName(1))
End If