DatabaseField.PictureValue
From Xojo Documentation
This item was deprecated in version 2019r2. Please use DatabaseColumn.Value as a replacement. |
Property (As Picture )
aDatabaseField.PictureValue(Format as String=Picture.FormatPNG,quality as Integer= Picture.QualityDefault) = newPictureValue
or
PictureValue = aDatabaseField.PictureValue(Format as String=Picture.FormatPNG,quality as Integer= Picture.QualityDefault)
New in 2011r2
Supported for all project types and targets.
or
PictureValue = aDatabaseField.PictureValue(Format as String=Picture.FormatPNG,quality as Integer= Picture.QualityDefault)
New in 2011r2
Supported for all project types and targets.
Gets or sets the PictureValue using the specified picture format.
Property (As Picture )
aDatabaseField.PictureValue = newPictureValue
or
PictureValue = aDatabaseField.PictureValue
New in 2011r2
Supported for all project types and targets.
or
PictureValue = aDatabaseField.PictureValue
New in 2011r2
Supported for all project types and targets.
Gets or sets the PictureValue.
Notes
For most databases you will want to use the NativeValue property instead.
For situations where you need to set a database column to NULL, you should use the Value property like this:
rs.Edit
rs.Field("MyColumn").Value = Nil // sets to NULL in the database
rs.Update
rs.Field("MyColumn").Value = Nil // sets to NULL in the database
rs.Update
Sample Code
Get the picture value of a column in a RecordSet:
// rs is a RecordSet with a picture column called "ProductImage"
Dim productImage As Picture
productImage = rs.Field("ProductImage").PictureValue
Dim productImage As Picture
productImage = rs.Field("ProductImage").PictureValue
Set the picture value of a column in a RecordSet:
// rs is a RecordSet with a picture column called "ProductImage":
rs.Edit
rs.Field("ProductImage").PictureValue = Canvas1.Backdrop
rs.Update
rs.Edit
rs.Field("ProductImage").PictureValue = Canvas1.Backdrop
rs.Update
Get the picture value of a column in a RecordSet, converting it to JPEG: