How to display image (byte type field) on the web
Posted in 2008
Topics: Stored Procedures & SPL
I have a table called emp_pic that has employees pictures stored as byte field in Informix. It works fine in our 3rd party ID Software. But when I tried to use the same field to display picture on the Web using VB code. It did not work. This is my table structure. empl_no integer no name char(50) yes department char(40) yes image byte yes Is there a way to convert this byte filed to .jpeg or .tiff image file so I can use it in other applications? I was trying to display it using the following command in VB. But I was not sure what contenttype it needs to be. Response.ContentType = "image/jpg" Response.BinaryWrite(rs("image")) I would really appreciate any help I can get. Thank you!! Faz
On Tue, Nov 4, 2008 at 10:06 AM, VILASINEE KIATKWANKUL <faz@city.newport-beach.ca.us> wrote: > I have a table called "emp_pic" that has employees' pictures stored as byte > field in Informix. Same question asked in the Development Tools list. I've answered there. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.