Important: Please read the Qt Code of Conduct -

Images from MS Access database

  • Hi!

    First of all, sorry for my English and Happy New Year everyone.

    I've got a MS Access 2007 database with 4 columns (1 Autonumber column, 2 text columns and 1 OLE Object column for an image). My Qt application doesn't show that image, it just shows strange symbols and I don't know how to work with that column. Any ideas? please. Thanks!

    Here, the 'Foto' column is the OLE Object column:

  • If you're lucky, that column is just the binary data of the image, i.e. try to read it with QImage::fromData(...).
    If you're unlucky, it's some Microsoft® OLE Crap. In that case, you'll need to either wade through x-thousand pages of Microsoft® OLE specifications or find some library whose desperate developers have done that for you. <rant>That's what you get when you submit to companies whose business plans are purely based on vendor-lock-in. Can't you turn that column into a binary blob?</rant>

  • @DerManu

    I can't turn that column a binary blob. I tried with QImage::fromData but without success. Anyway, if I got to show the pictures from MS Access, I will tell you how I did it. I'm open to suggestions and advices from everyone. Thanks.

Log in to reply