Xojo2019v2 RowSet PictureValue

2019V2 isn’t great.
I am trying to save a PictureValue to SQLite.
The documentation says

rs.EditRow
rs.Column(“Photo”).PictureValue = MyPhoto
rs.SaveRow

This doesn’t compile - Compiler says you cannot assign a value to this property, referring to PictureValue.
Instead I coded

if cBadge <> oCBadge then
rec.Column(“clubBadge”).Value = cBadge
oCBadge = cBadge
end if
This compiles. cBadge and oCBadge are defined a type Picture.
Column clubBadge is defined as a BLOB.
This compiles but fails with a TypeMismatchException.

Does anyone know how you’re supposed to save a picture.
I’m on MacOS 10.14.6 and running Xojo2019v2.

Thanks
Jack

The correct syntax is

rs.Column("Photo").PictureValue(Picture.Formats.PNG) = MyPhoto

I’ve updated the doc sample code.

(The full syntax for assignment is shown in the 2nd syntax box on the page.)

That worked, thanks for that.
That syntax requires you know the format of image.
This particular column may contain JPGs, TIFFs, PNG or any other format support by QuickTime?
Is there anyway to get it to work the way RecordSet did?

If the user simply drops a picture, I won’t know what format it would be.

Jack

The format of your image is… NONE. It is just a in memory bitmap stored in a picture class.

Each time you save that bitmap, there is a compression/conversion to the picture format you put in the parameter.