This content has been marked as final.
Show 6 replies
-
1. Re: <cfoutput query> problems
jdeline Jul 28, 2006 5:12 AM (in response to Ronsweb)Please provide the actual code that includes the query and the beginning and end of the CFOUTPUT and/or CFLOOP. And place your code in the "Attach Code" area. It displays it using nonproportional font, which will show where your spaces are in the Replace function. -
2. Re: <cfoutput query> problems
Dan Bracuk Jul 28, 2006 7:29 AM (in response to Ronsweb)Generally, replacing chr(10) with <br /> gets the job done. I don't see that in your code. -
3. Re: <cfoutput query> problems
Ronsweb Jul 28, 2006 8:24 AM (in response to Dan Bracuk)I actually copied the output on the html page. The <br> and did not show up.
Here is the actual replace function.
<cfset text3 = Replace(Replace(qmysignsret.text3, chr(32),' ','all'), Chr(10), '<br>', 'All')><br>
Thanks
Ron -
4. Re: <cfoutput query> problems
Ronsweb Jul 28, 2006 8:58 AM (in response to Ronsweb)I just tested it on SQL 2000 and the same problem exist. I thought maybe it is a access problem. I wonder if this is a bug with CF?
-
5. <cfoutput query> problems
Ronsweb Jul 28, 2006 9:01 AM (in response to Ronsweb)
I have tested on both mx 7 and 6.1 servers. This is not just with our environment. It is with a outside host that I also use.
Here is the actual code:
<cfinvoke component="testaccess" method="qsigninfo" sign_ID="659" returnvariable="qmysignsret">
<cfset text3 = Replace(Replace(qmysignsret.text3, chr(32),' ','all'), Chr(10), '<br>', 'All')><br>
<br>
<br>
<strong>Text output with <cfoutput query="qmysignsret"></strong><br>
<cfoutput query="qmysignsret">#text3#</cfoutput>
<br>
<br>
<br>
Text output with <cfoutput><br>
<cfoutput>#text3#</cfoutput>
----------------------------------------------------------------
Here is the cfc
<cfcomponent>
<cffunction access="remote" name="qsigninfo" output="false" returntype="query">
<cfargument name="sign_ID" type="numeric" required="no" default="">
<cfquery name="qsigninfo" datasource="acit">
SELECT *
FROM ez4X4_1template
WHERE sign_ID = <cfqueryparam value="#arguments.sign_ID#" cfsqltype="CF_SQL_NUMERIC">
</cfquery>
<cfreturn qsigninfo>
</cffunction>
</cfcomponent> -
6. Re: <cfoutput query> problems
Ronsweb Jul 28, 2006 3:31 PM (in response to Ronsweb)I finally figured out how to get the text to return with <cfoutput query=qmyqueryret>
Here is the code:
<cfoutput query="qmyqueryret">
<cfset formatedtext3 = Replace(qmyqueryret.text3,chr(32)," ","all")>
<cfset formatedtext3 = ReReplace(formatedtext3, "\n", "<br />", "ALL")>
#formatedtext3#
</cfoutput>


