Image in a DataWindow row
- New
- How-to
-
Dan Harrel
- PowerBuilder
- Wednesday, 4 February 2026 09:07 PM UTC
I've been using PowerBuilder forever, but now I'm wanting to do something that seems simple that I haven't done before, but it's looking more complicated than I would have expected. I hope I'm not missing something easy, and embarrassing myself!
Say I've got a database table with a text column and a long binary column. The long binary column holds an image (a QR code, to be precise). The text column holds descriptive text. To be fully precise, I'm using PowerBuilder DataWindows to print QR Code labels.
I would like a DataWindow where each row has the descriptive text along with the image. This seems like it should be pretty standard stuff - for example, the name of something you're selling accompanied by a picture.
What I thought I should be able to do is drive the DataWindow with a SQL select bringing in the text and image column. Then plunk a column control down for the label, and some sort of "image control" for the picture. Easy Peasy.
But, I can't include a long binary in a DataWindow's SQL, and there seems to be no such thing as the "image control" that I describe.
It's looking to me like I need to use a TableBlob for the image, but this will work as one retrieval to get all rows of the base result set, including all text column values, and then one retrieval per row to get the images one at a time. This seems inefficient, and complex.
Am I missing something?
As an aside - I could store the QR Code image as base64 in a Long Varchar column, which DataWindows support. Is there a nice way for a DataWindow to retrieve a list of such Base 64 encoded images and then un-encode them and display in the DataWindow as images?
Thanks!
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.