• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6360
  • 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.
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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 GarciaCommented:
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,

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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