DatabaseColumn.BooleanValue

From Xojo Documentation

Property (As Boolean )
aDatabaseColumn.BooleanValue = newBooleanValue
or
BooleanValue = aDatabaseColumn.BooleanValue

New in 2019r2

Supported for all project types and targets.

Used to get and set the values of Boolean field types.

Notes

The values "0" and "False" are treated as False and "1" and "True" are treated as True. The behavior of any other values is undefined when retrieved using BooleanValue. Use StringValue to retrieve the original values in the field.

For situations where you need to set a database column to NULL, you should use the Value property like this:

rs.EditRow
rs.Column("MyBooleanColumn").Value = Nil // sets to NULL in the database
rs.SaveRow

Sample Code

Get the boolean value of a column in a RowSet:

// rs is a RowSet with a boolean column called "AllowEmails"
If rs.Column("AllowEmails").BooleanValue Then
MsgBox("Emails are allowed.")
End If

Set the boolean value of a column in a RowSet:

// rs is a RowSet with a boolean column called "AllowEmails":
rs.EditRow
rs.Column("AllowEmails").BooleanValue = True
rs.SaveRow