DatabaseColumn.PictureValue
From Xojo Documentation
Method
Gets the Picture value for the column.
Method
DatabaseColumn.PictureValue(format As Picture.Formats, quality As Integer = Picture.QualityDefault, Assigns value As Picture)
New in 2019r2
Supported for all project types and targets.
New in 2019r2
Supported for all project types and targets.
Sets the Picture value for the column.
Notes
For situations where you need to set a database column to NULL, you should use the Value property like this:
rs.EditRow
rs.Column("MyIntegerColumn").Value = Nil // sets to NULL in the database
rs.SaveRow
rs.Column("MyIntegerColumn").Value = Nil // sets to NULL in the database
rs.SaveRow
Sample Code
Get the picture value of a column in a RowSet:
// rs is a RowSet with an picture column called "Photo"
Var photo As Picture
photo = rs.Column("Photo").PictureValue
Var photo As Picture
photo = rs.Column("Photo").PictureValue
Set the picture value of a column in a RowSet:
// rs is a RowSet with an picture column called "Photo" and MyPhoto is a picture:
rs.EditRow
rs.Column("Photo").PictureValue(Picture.Formats.PNG) = MyPhoto
rs.SaveRow
rs.EditRow
rs.Column("Photo").PictureValue(Picture.Formats.PNG) = MyPhoto
rs.SaveRow