A SQLite DB is set up with “StPic” as a blob column holding a picture
dim rec As New DatabaseRecord
rec.picturecolumn("StPic") = thePicture
now throws an UnsupportedFormatException in Xojo 2017r2 after working correctly for many previous releases.
Changing to
rec.blobcolumn("StPic") = thePicture
shows an error on compile “There is more than one item with this name and it is not clear to which this refers”
Cannot use the “converting picture to a text” trick found in the forum archives due to backward compatibility issues with versions of this app in circulation.
I can always compile with 2017r1.1 where the .picturecolumn still worked, but I want to compile for 64-bit and use the added features of r2
rec.blobcolumn(“StPic”) = thePicture
shows an error on compile “There is more than one item with this name and it is not clear to which this refers”[/quote]
FWIW, BlobColumn takes a String, not a Picture. So you’d have to change it to something like this:
I haven’t tried it, but it’s worth a shot. I suspect you’d need to make sure the types match, though. So for my example using JPEG, it would be like this:
FOLLOW UP—
Turns out the problem was not what I thought it was at all. In
rec.picturecolumn("StPic") = thePicture
I was getting thePicture by pulling a pic which I had stored in the project. Like all of my project images, I had added a @2x to that. So I had noPic and noPic@2x in the project. Then when I did
thePicture = noPic
Xojo was confused and created the errors I was seeing. Bottom line: rec.pictureColumn still works just fine if you pass it a simple picture object.
For my purposes, I just removed the @2x element and it now works. But for future reference how would I refer to the picture so Xojo would select the correct one for hiDPI or not?