Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image stored in a BLOB field on MSSQL server
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Image stored in a BLOB field on MSSQL server
 Login/Join
 
Member
posted
Is there any way in WebFocus to display images stored in a BLOB (IMAGE) field in MS SQL databse? Or convert them into real images on the disk?
Thanks in advance

This message has been edited. Last edited by: FP Mod Chuck,


WF 8.0.6
Windows Server 2003
 
Posts: 18 | Registered: July 26, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Alek,

Has this issue been resolved?

I am wondering, can you please provide us a little more details on what you are trying to accomplish?

Also, as always suggested here, can you please update your signature? This way we know the environment you are working on and it will help all to provide constructive suggestions.

Thank you in advance for sharing with all. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
Member
posted Hide Post
Thanks Kerry, I have resolved it by executing a Java application from WebFOCUS procedure which converts a BLOB binary field into an image file on the disk. Then I use a path to the image in my PDF report.


WF 8.0.6
Windows Server 2003
 
Posts: 18 | Registered: July 26, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Alek,

Can you show me how you were able to execute a JAVA Application?



Thanks
Richard


Web Focus Developer Studio Ver 7.62
Windows XP platform.
mostly dynamically built reports
 
Posts: 5 | Registered: September 28, 2007Reply With QuoteReport This Post
Member
posted Hide Post
-SET &CMD= 'java -cp c:\ibi\apps\spread_printout;c:\sqljdbc.jar Connect' | ' ' | &VENDORPRODUCTID | ' ' | &COUNTER | ' ' | 'c:\ibi\apps\spread_printout\';

-DOS &CMD.EVAL


WF 8.0.6
Windows Server 2003
 
Posts: 18 | Registered: July 26, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
Alek,
I have a very similar requirement to read an Image out of BLOB/IMAGE field from sql server using an ID. Is this the preferred way to read/display the image ? I'm wondering if there's a way to not save but display it in HTM page so we can avoid the multiple images in the app folder, specially if they're confidential/classified.
Thanks in advance.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
I would convert the image first to text and then include this text in the HTML.

Convert:
cast(cast( as binary) as varchar(1000)) as image_text


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 446 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
I'm not sure what I'm missing here but its just some special characters and when I use it the report there's really no image


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
Master
posted Hide Post
quote:
...requirement to read an Image out of BLOB/IMAGE field from sql server...

Here is an example running against the Microsoft SQL Server AdventureWorks2014 sample db:
TABLE FILE PRODUCTPHOTO
"Product Photos"
PRINT PRODUCTPHOTOID
      LARGEPHOTO
WHERE PRODUCTPHOTOID EQ 76
-**************************
-* Lines between asterisk lines required for BLOB image support
-* for HTML and DHTML formats.
ON TABLE SET HTMLEMBEDIMG AUTO
ON TABLE SET HTMLARCHIVE ON
ON TABLE SET HTMLCSS ON
-**************************
ON TABLE SET STYLE *
 INCLUDE = endeflt, $
 TYPE=DATA,COLUMN=LARGEPHOTO,IMAGE=(LARGEPHOTO),SIZE=(2 1.5),$
ENDSTYLE
END 

This message has been edited. Last edited by: David Briars,
 
Posts: 813 | Registered: April 23, 2003Reply With QuoteReport This Post
Guru
posted Hide Post
Thank you David. This helps a lot!

quote:
TABLE FILE PRODUCTPHOTO
"Product Photos"
PRINT PRODUCTPHOTOID
LARGEPHOTO
WHERE PRODUCTPHOTOID EQ 76
-**************************
-* Lines between asterisk lines required for BLOB image support
-* for HTML and DHTML formats.
ON TABLE SET HTMLEMBEDIMG AUTO
ON TABLE SET HTMLARCHIVE ON
ON TABLE SET HTMLCSS ON
-**************************
ON TABLE SET STYLE *
INCLUDE = endeflt, $
TYPE=DATA,COLUMN=LARGEPHOTO,IMAGE=(LARGEPHOTO),SIZE=(2 1.5),$
ENDSTYLE
END


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image stored in a BLOB field on MSSQL server

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.