Xojo R2.1 Saving a png in database

How do I save a png with R2.1?
With R1.1 and R2 I used
rec.PictureColumn(“BookCVR”) = cc_EditPic1.imgwell_EditPic.Image
but 2.1 does not accept PictureColumn.

Did you try the overloaded method for PictureColumn, where the image is the second parameter?

Otherwise, on the documentation website DatabaseRecord.PictureColumn shows as deprecated and now suggests DatabaseRow.BlobColumn as a replacement.

The second link shows an example of saving a PNG image.

I hope that helps.

PictureColumn, BlobColumn and BooleanColumn do not seem to exist any longer. The example on DatabaseRecord.PictureColumn does not work in R2.1
The error I get is Type “DatabaseRow” has no member named “PictureColumn”
(also rec.Column(“BookCVR”).Value = cc_EditPic1.imgwell_EditPic.Image doesn’t work)

What about:

// Var rec As New DatabaseRow
rec.Column(“BookCVR”).PictureValue(Picture.Formats.PNG) = cc_EditPic1.imgwell_EditPic.Image

It looks like the documentation for DatabaseRow still needs some updates about deprecation.

In the announcement earlier, about the r2.1 release, @Dana Brown did say “DatabaseRow.Column now returns a DatabaseColumn which can be used to obtain and set the column values. Other column methods have been removed.”

Give Rick’s suggestion a try.

Thank you Rick, that fixed it.

It looks like the documentation for DatabaseRow is updated in the build-in Language Reference with the 2019r2.1 IDE, but not on the docs website (not yet, anyway).

I have a habit of usually always going to the online source first, thinking that’s the one more up-to-date, but understandably it takes time to get it there upon a brand new release.