1. Zachary Curtis
  2. PowerBuilder
  3. Monday, 20 May 2024 20:49 PM UTC

Hi all,

I'm working on a program that allows the user to build/customize a DataWindow, and I'd like the user to be able to add an image to their format. I'm storing images in the database, so I'd like to be able to use the tableblob object, since it makes it easy to display the image straight from the database.

However, I'm having trouble adding a tableblob object to the DataWindow programmatically. Typically, I would use dw.Modify() to create a text field, computed field, etc., but I'm struggling to create a tableblob object this way.

Anyone know how to get this working, or a different way to create a tableblob programmatically?

I'm using PowerBuilder 22.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 21:10 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Zachary;

  Unfortunately, you will notice that the <DW Control Name>.Modify ( "create  ... " ) command does not support the TableBlob data type.

  So you would either need to ...

  • Maintain 2 DWO's - one with / one without the TableBlob mapping.
  • Manage the DWO source code yourself (ie: LibraryExport / LibraryImport commands)
  • Use the InkPicture Control (with your own SelectBlob command)
  • Use the Picture Control (with your own SelectBlob command)

HTH

Regards .. Chris

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 22 May 2024 23:21 PM UTC
  2. PowerBuilder
  3. # 1
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 22 May 2024 23:19 PM UTC
  2. PowerBuilder
  3. # 2

Since you're downloading the images, the "Display as Picture" would work great too!

Comment
There are no comments made yet.
Zachary Curtis Accepted Answer Pending Moderation
  1. Wednesday, 22 May 2024 22:29 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris,

Thanks for the response. That's kind of what I was thinking would be the case. I think I'll either end up maintaining the DataWindow syntax directly, or more likely I'll download the image to a temp directory and just use a bitmap.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.