Ask a Question related to Coldfusion Database Access, Design and Development.
-
mofufus23 #1
How to Display A Stored TIF Blob field in SQL Server
Does anybody know how to display a TIF blob field in SQL Server? :confused;
mofufus23 Guest
-
BLOB display in flash
First, please do not post about using a file system for images rather than storing them in mysql as I know how to do this and I want to store the... -
Setting the value of an Informix v7.3 BLOB field using ADO, VFP and OLEDB
Hi everyone, I'm trying to replace an Informix v7.3 BLOB field in an existing record with a .PDF file and it's giving me fits! I've adapted the... -
Problem reading a blob field in oracle (no, just converting it)
Hi, I read a blob field from oracle using the recordser("FIELD").GetChunk....... I get the good value out of it. The problem is that this data... -
PHP + Firebird problem with blob field size
Hello people, First: sorry my weak english. I´m brazilian. I have the fallow blob field in my database: CREATE DOMAIN DM_TEXT AS BLOB SUB_TYPE 1... -
How to Insert documents to a BLOB field
Hi, I have an Access Front-End application and an Oracle Back-End for my tables. I have a BLOB field in one of the tables. I use Access form to... -
PaulH #2
Re: How to Display A Stored TIF Blob field in SQL Server
don't know that you can. don't you need some kind of plugin to display non-gif/jpeg/png images?
PaulH Guest
-
unleashed #3
Re: How to Display A Stored TIF Blob field in SQL Server
I'm not sure if this will work for TIF's, but it does work for JPEG's...
This is how I do it... (In your CF Administrator, under your datasource, you
need to make sure you select "Enable binary large object retrieval (BLOB)" and
adjust your "Blob Buffer(bytes)" accordingly. By default the buffer size is
64kb and images will be truncated if larger than 64kb.)
Your page containing information and image that you want to display.
*******************************************
<cfquery>
SELECT * FROM EMPLOYEES
</cfquery>
<img src="getPhoto.cfm?EmployeeID=#EmployeeID#" border="0" width="144"
height="180">
<!--- This calls your getPhoto.cfm page and passes in your EmployeeID --->
<br>#EmployeeName#
*******************************************
In your getPhoto.cfm page...
<!--- Need to have these two lines, you only want the image to be streamed
back to your display page and not any other text. --->
<cfsetting enablecfoutputonly="Yes">
<cfsetting showdebugoutput="No">
<cfquery name="getBlob">
SELECT TOP 1 EmployeePhotoBlob, EmployeeName FROM Employees WHERE EmployeeID =
#EmployeeID#
</cfquery>
<cfheader name="content-disposition"
value="Inline;filename=#EmployeeName#.jpg">
<cfcontent type="image/tiff; charset=iso-8859-1"> <!--- This tells the page to
export in TIFF format. --->
<cfoutput>#tostring(tobinary(getBlob.EmployeePhoto Blob))#</cfoutput>
************************************
Hope this helps...
James
Sacramento, CA
unleashed Guest



Reply With Quote

