Insert Picture into sqlite

Hi,

I want to insert picture as logo to be printed in xojo report.

I am trying to use the sample project included in xojo but it has an error, cant run properly.

so I am trying to create the new one.

if not app.print_pos.connect() then
  Beep
else
  dim rec as DatabaseRecord
  rec = new DatabaseRecord
  
  rec.Column("pic").BlobValue = PictureCanvas.Backdrop.ToData(Picture.Formats.PNG)
  app.print_pos.InsertRecord("logo",rec)
end if
app.print_pos.Commit

It still giving an error, string has no member value.
even it define as a sqlblob also not working.

any helps?

I am using xojo 2021 r.1.1

thanks
regards,
arief

Choose “New Project” from the File menu and open Examples → Database → SQLite → SQLiteBlob. This example project has methods to store and load blob data.

1 Like

Hi,

I have check, this one is working.
but I have other easy way to do it, Sqlitestudio3 has a feature to add the picture manually.

thanks
arief