DatabaseRow.Column

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

DatabaseRow.Column(name As String) As DatabaseColumn

New in 2019r2.1

Supported for all project types and targets.

Gets the DatabaseColumn for column name.


Method

DatabaseRow.Column(name As String, Assigns value As Variant)

New in 2019r3.1

Supported for all project types and targets.

Sets a value for column name. This is more optimized than using DatabaseColumn.

Sample Code

Creates a new row in the team table:

Var row As New DatabaseRow

row.Column("Name").StringValue = "Penguins"
row.Column("Coach").StringValue = "Bob Roberts"
row.Column("City").StringValue = "Boston"
Try
myDB.AddRow("Team", row)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
End Try

Creates a new row in the team table:

Var row As New DatabaseRow

row.Column("Name") = "Penguins"
row.Column("Coach") = "Bob Roberts"
row.Column("City") = "Boston"
Try
myDB.AddRow("Team", row)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
End Try