Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying images from BLOB (SQL)

Hey,

I´ve ran into some trouble trying to display images read from the SQL database in Qlikview 8.5. The reference guide tells me that it should be able to understand BLOB information and you should also be able to view the data in the blob viewer while doing the sql select.

So i´ve tried something like this:

Pictures:

Bundle info load Filename,

FileData // this is the binary data fetched from sql

Select Filename, FileData from database;

This gives me the Pictures and it shows as something saying "$orpahn_pictures" in the datamodel, which is not too assuring. I´ve then tried to display the data by creating a text object and puting "=info(pictures)" as the expression and changed the display format back and forth between text and image and nothing seems to be of help.

If i load the data with a normal load select command, i get the picture information in a hexadecimal form, so i know that the data is not empty. Also if i try to use the BLOB viewer, it seems to be crashing everytime.

Anyone here with some experience on bringing images to Qlikview from the SQL database, who could help me with this problem?

Ps. and i really need to fetch the picture(BLOB) data from sql, just getting the path doesn´t work.

Thank you!

3 Replies
Not applicable
Author

I'm having same situation with QV9 sr 3. I have listbox full of id values and textbox which displays picture with selected id. I need to load image blobs from db. Currently loading is done like this:
-------------
pictures:
INFO LOAD photoId, photoImage;
SELECT DISTINCT photoId, photoImage
FROM photos;
-------------

Instead of the image there is text:
xPNG
x
where x are replaced with empty boxes. If I change the loading to:
-------------
pictures:
BUNDLE INFO LOAD photoId, photoImage;
SELECT DISTINCT photoId, 'c:/testImage.png' as photoImage
FROM photos;
-------------
everything works fine. So the problem seems to be with the blobs. Any ideas?

I dumped the blobs as images to the filesystem and they seem to be ok. Problem doesn't seem to be in corrupted images or in SQL.

How did you manage to solve this problem?

Not applicable
Author

Hi,

Like you can see from the posting, it´s been awhile since I battled with that question,
so my memory is a bit fuzzy regarding the issue.

My problem in the end was that the ERP system that was used to store the blob in the SQL , actually didn´t do a binary insert. It used a header of it´s own in the binary, which caused the files to be "corrupted". I went around that by storing the files in a different way and retrieving them through ODBC and then everything worked fine...

Looking back at the application in the script I have:

ODBC CONNECT TO "Where you want connected"

INFO SELECT Imagename,
Image
FROM Imagetable;

And in the layout object I only have

INFO(Imagename) in a text object that has presentation set to image.

Hope you find a solution to your problem.

-Petteri

Not applicable
Author

I also met the same question...