I've not tried this in MX (have they actually improved it that much?) but in
previous version EVALAUTE() would NOT evaluate tags, only expressions.


So you could do EVALUATE("#myName#") or EVALUATE("#Len(myName)#") or even
EVALUATE("#Iif(Len(myName), DE(""Hi""), DE(""Bye""))#")


But NOT EVALUATE("<cfoutput>#myName#</cfoutput>")


Of course since 5.0 you could also abstract much of the "Tag work" you might
need into UDFs allowing you to perform much more complex evaluations.  But
in the end also remember that Evaluate() is one of the most expensive and
slowest of the CF functions so that that into account.


Jim Davis

  _____  

From: Adkins, Randy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 2:55 PM
To: CF-Talk
Subject: RE: CF in a database

Yes and Yes

Once it is saved into the DB such as the following into a field called:
myCode :

<CFOUTPUT><CFSET myName = "Randy">#myName#</CFOUTPUT>

When you call it from the DB to be ran on the server:

<CFOUTPUT QUERY="qGetMyCode">
  #EVALUATE(qGetMyCode.myCode)#
</CFOUTPUT>

-----Original Message-----
From: Eric Jones [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 2:45 PM
To: CF-Talk
Subject: CF in a database

I posted this on CF-Newbie as well. Sorry for the cross post.

Hey all,
    I'm wondering is it possible to store CF Code in a database and then
have the CF server execute it when it's extracted? if so can you give me a
working example??

ERJ
  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to