Ask a Question related to Coldfusion Database Access, Design and Development.
-
KingScooby #1
CFML from MSSQL
I am attempting to pull CFML, <cfoutput>'s, etc. from a database and have them
inserted into a .cfm page and executed at runtime. Instead of the CFML tags
are stripped and all the code within the <cf*> tags is displayed literally.
Example:
<cfquery name="qUsername" datasource="SQLServer" username="*****"
password="*****">
SELECT * FROM dbo.websiteUsers WHERE dbo.websiteUsers.lastname =
'<cfoutput>#URL.lastname#</cfoutput>' AND dbo.websiteUsers.firstname =
'<cfoutput>#URL.firstname#</cfoutput>' AND dbo.websiteUsers.username =
'<cfoutput>#URL.username#</cfoutput>' AND dbo.websiteUsers.email =
'<cfoutput>#URL.email#</cfoutput>'
</cfquery>
displays literally:
SELECT * FROM dbo.websiteUsers WHERE dbo.websiteUsers.lastname =
'#URL.lastname#' AND dbo.websiteUsers.firstname = '#URL.firstname#' AND
dbo.websiteUsers.username = '#URL.username#' AND dbo.websiteUsers.email =
'#URL.email#'
How can I pull CFML from a database and have it execute on the .cfm?
I've posed this question on [url]www.experts-exchange.com[/url] and the 'expert' told me
it couldn't be done...I'm really hoping he is wrong.
-adam.
KingScooby Guest
-
Flash and CFML
I just posted this same question but was in the wrong section of the forums. I am very new to flash but can definitely see the potential of this... -
CFML to HTML
Is there a way to convert a whole ecommerce site with all of it's many products from CFML to HTML for easy spidering? I haven't found any snippets... -
convert ASP to CFML
I purchased an RSS feed from coolfocus.com. This applet contains an ASP script. I am attempting to convert this from ASP to CFML. I dont know how... -
CFML & MySQL
Can I use CFML with MySQL? at the moment I am using CFML with MS Access. Can I use the same CFML code with MySQL? Dario -
use cfml in JS
Hi Is it possible to use ColdFusion functions in Javacript ? e.g. (won't work) <script language="JavaScript" type="text/javascript"> <!--... -
Neculai Macarie #2
Re: CFML from MSSQL
> I am attempting to pull CFML, <cfoutput>'s, etc. from a database and have
themtags> inserted into a .cfm page and executed at runtime. Instead of the CFMLliterally.> are stripped and all the code within the <cf*> tags is displayedtold me>
> Example:
>
> <cfquery name="qUsername" datasource="SQLServer" username="*****"
> password="*****">
> SELECT * FROM dbo.websiteUsers WHERE dbo.websiteUsers.lastname =
> '<cfoutput>#URL.lastname#</cfoutput>' AND dbo.websiteUsers.firstname =
> '<cfoutput>#URL.firstname#</cfoutput>' AND dbo.websiteUsers.username =
> '<cfoutput>#URL.username#</cfoutput>' AND dbo.websiteUsers.email =
> '<cfoutput>#URL.email#</cfoutput>'
> </cfquery>
>
> displays literally:
>
> SELECT * FROM dbo.websiteUsers WHERE dbo.websiteUsers.lastname =
> '#URL.lastname#' AND dbo.websiteUsers.firstname = '#URL.firstname#' AND
> dbo.websiteUsers.username = '#URL.username#' AND dbo.websiteUsers.email =
> '#URL.email#'
>
> How can I pull CFML from a database and have it execute on the .cfm?
>
> I've posed this question on [url]www.experts-exchange.com[/url] and the 'expert'You need to write the content to a temporary file, cfinclude that file, then> it couldn't be done...I'm really hoping he is wrong.
delete it (to keep the place clean).
--
<mack />
Neculai Macarie Guest
-
KingScooby #3
Re: CFML from MSSQL
Thanks for your response.
Would you be so kind as to provide some sample code?
KingScooby Guest
-
Neculai Macarie #4
Re: CFML from MSSQL
> Thanks for your response.
Something like this (untested):>
> Would you be so kind as to provide some sample code?
<cffile action="write" file="#ExpandPath('.')#/temp.cfm"
output="#query.cfml_code_field#">
<cfinclude template="temp.cfm">
<cffile action="delete" file="#ExpandPath('.')#/temp.cfm">
--
<mack />
Neculai Macarie Guest



Reply With Quote

