• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6935
  • Last Modified:

Display BLOB picture in Datawindow (JPG)


I am trying to display jpg's in a datawindow. Those pics were stored in a table using UPDATEBLOB.

Now my problem is that I was only able to display BMP's in the datawindow (using an OLE object, Class = Paint.Picture). I am aware that this class only handles bitmaps.

Does anybody know what Class to use in order to display jpg's?

Your answer is very much appreciated.


P.S. I am using powerbuilder 11.5
1 Solution
try to create a picture object and put the image inside this, like example:

                  // Mostra a foto na tela do colaborador
                  SELECTBLOB imagem INTO  :lb_imagem
                          FROM colaborador
                          WHERE nr_matricula = :ll_matricula ;
                  if len(lb_imagem) = 0 or isnull(lb_imagem) then
                        p_1.PictureName = " "
                        p_1.visible = false
                        p_1.visible = true
                  end if

theetAuthor Commented:
Thank you for your answer - but I can't use a picture object because I need the pic in a datawindow (one per row)...
1 - Create a datawindow with a picture inside and point the picture address to a temporary folder  defining a standard name, for example idnumber+”.jpg”
2 - Delete all files in temporary folder
3 - Extract all images to that folder using standard name defined
4 - Retrieve datawindow.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

theetAuthor Commented:
Thank you for this suggestion... But unfortunately that isn't possible in my case. Isn't there a way to display those pictures in a datawindow???
I've requested that this question be closed as follows:

Accepted answer: 500 points for carcarah's comment http:/Q_27412412.html#37099363

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
theetAuthor Commented:
Is there really no other possible solution???? What about OLE, Active-X or something like that... I really need a solution.
The problem is: you don't have a way to "device" to send the picture from database directly to page. You need a place to extract image before show it in the page.
 I frankly have doubts if maintain images in data base is a good idea. The only good reason to do this would be security issues. If you separate the pictures in a shared folder and insert in the database just picture's address you would have a better performance.

theetAuthor Commented:
That's the way we have been doing it. But in large networks it is sometimes hard to get people to save their immages in a public folder so everybody has access... And some of the pictures need to be protected because we're in the health industry. So I really wish there was a solution to this problem....
theetAuthor Commented:

I think I found a work around: I am using a inkPicture control within the datawindow. That type of controll is designed for collecting pen input on a tablet pc but it seems to work fine for just displaying blob pics.

Is there a reason for not using this control?


Ariel GarciaJefe de SistemasCommented:
Yes this can be done, i create a recognition software and need this behavior, i create a small DW with one parameter the id of image to show, then the main DW include this DW-Image with proper paramter then all was ok.

If you like more then give me advice, but the concept are OK.

Well i dont use show as picture inded i use a picture-ink object to show the picture, in the small Dw.

--- Unless this methode was to Screen, if you try to create a catalog of images the best way are save images to disk then include in the Dw "as string variable" then show as picture.

I hope this usefull to you
Hi Theet,

I do have same problem. I have tried to use inkPicture but it is not working well in my case. Can you help me in this situation. I'm using PowerBuilder 10.5. MySQL 5.5 and MySQL ODBC/Connector 5.1.

Images are save into database MySQL database mediumblob column. from VS 2010, class library. Image format is JPEG.

Well, I'm able to see those images in Picture Control in Window object using SelectBlob. But my issues is to show those images in Datawindow for each row.

Your help will be highly appreciated.

Thanks in advance,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now