Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Tim B. on February 11, 2009, 10:26:33 am



Title: Displaying Images Stored in the DB
Post by: Tim B. on February 11, 2009, 10:26:33 am
I've managed to get images stored in the DB displaying in Genero now by using the textcopy utility in SQL Server to write out the image to a temporary file and displaying the file to the IMAGE on screen.

I thought I might also be able to do it directly by loading the image into a BYTE variable and displaying that directly, eg:-

Code
  1. DEFINE l_img BYTE
  2.  
  3. LOCATE l_img IN MEMORY
  4.  
  5. SELECT img INTO l_img
  6. FROM mytab
  7. WHERE ...
  8.  
  9. DISPLAY l_img TO img

However, as you've probably guessed, this fails on the DISPLAY because it expects a path, not the byte data itself.   Are there any plans to allow this sort of functionality?


Title: Re: Displaying Images Stored in the DB
Post by: Sebastien F. on February 11, 2009, 03:18:39 pm
Tim,

Discussed internally:
It should be possible to display BYTE images directly to fields...
We will investigate and try to implement this.
But it will probably only be in 2.20.

Seb


Title: Re: Displaying Images Stored in the DB
Post by: Sebastien F. on February 18, 2009, 09:45:14 am
Tim,

We started to implement DISPLAY BYTE to IMAGE fields, and we found a good solution.
However, we have other features scheduled for now and DISPLAY BYTE may not be in the next 2.20 GA.
We will for sure support that in a near future.

Seb