DatabaseRow

From Xojo Documentation

Revision as of 15:39, 15 November 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from Object)


New in 2019r2

Used to create new Database rows (records). The methods are used to populate the columns in a row (record).

Methods
Column ColumnAt ColumnCount

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"
row.Column("StartTime").DateTimeValue = New DateTime(1, 1, 1, 6, 0, 0) // 6AM - no specific date

Try
myDB.AddRow("Team", row)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
End Try

See Also

Database, DatabaseColumn, MySQLCommunityServer, ODBCDatabase, OracleDatabase, PostgreSQLDatabase, RowSet classes.