Thanks Shahzad,

I'll give it a try.

Mario

-----Original Message-----
From: Shahzad.Butt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 5:10 AM
To: CF-Talk
Subject: RE: Help with CFCONTENT


Don't use CFContent and if you want to delete the file use CFFile to
delete. If you use cfcontent type="image" you can never display text on
that specific page as it is treated as an image file then. On thing you
can try calling that page with CFContent(say blah.cfm) in another page
using <Img src="blah.cfm"> and display your text there like 

Image1: <img src="blah.cfm">......

I havent tried this thing but I think it might work. I am using
Coldfusion Custom Tag to do the job. CFX_GetImage CFX_PutImage. It works
perfect.

Shahzad

-----Original Message-----
From: Ciliotta, Mario [mailto:[EMAIL PROTECTED]] 
Sent: 28 August 2002 01:15
To: CF-Talk
Subject: Help with CFCONTENT


Hi all,

I was wondering if someone might be able to assist me.  My problem is
that I am trying to display an image that retrieved from a MS SQL Server
database and display it back in a html page.  The image displays
correctly but I do not get any of my HTML appearing.  Below is a sample
of what I am trying to do - it is kind of sloppy (since its late here
and I want to go home).  I am sure that I am doing something stupid with
cfcontent.

Any help would be appreciated.

Thanks

Mario Ciliotta



CODE Sample:

<cfheader name="pragma" value="no-cache">
<cfheader name="expires" value="-1">

<!--- This code works correctly - I can save it to a db and retrieve it
and create a file on the server ---> <cffile action="readbinary"
file="g:\inetpub\wwwroot\mario\oldpict.jpg" variable="imagebinary">

<cfquery name="test" datasource="db_spri11503">
        INSERT INTO tbl_myImageTable ( filename, fileblob )
        values ( 'old.jpg', '#tobase64(imagebinary)#')
</cfquery> 

<cfquery name="test2" datasource="db_spri11503">
        Select * from tbl_myImageTable 
</cfquery> 

<cfset tobin = tobinary(test2.fileblob)>  
<cffile action="WRITE" file="g:\inetpub\wwwroot\mario\old.jpg"
output="#tobin#" addnewline="No"> 

<!--- END WORKS Correctly --->

<!--- This code does not work correctly.  I only see on my page the
image called old.jpg.  I get no text (Image 1 or image 2) and there is
no new.jpg display.  When I go to view the source - there is no source
--->

<html>
<head>
        <title>Untitled</title>
</head>

<body>

Image 1:  <img src="new.jpg"><BR>

Image 2:   <cfcontent type="image/jpeg"
file="g:\inetpub\wwwroot\mario\old.jpg" deletefile="No"> 
<!--- End Does Not Work --->
</body>
</html>

This message is for the named person's use only. It may contain
sensitive and private proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended recipient, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. CREDIT SUISSE GROUP and each legal entity in the
CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business
units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all
e-mail communications through its networks. Any views expressed in this
message are those of the 
individual sender, except where the message states otherwise and the
sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message
is indicative only, is subject to change and does not constitute an
offer to deal at any price quoted. Any reference to the terms of
executed transactions should be treated as  preliminary only and subject
to our formal written confirmation.




______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to