It depends. If the string coming out of the database has any cfml in it like <cfif> etc no. If it is just pound-encased variables then evaluate should work. One problem would be the existance of a single pound sign in the string. That would error unless you escaped it BEFORE putting it in the database.
The times I have implemented functinality iike this, I encased the "variables" in something very unlikely to appear in an actual sentence. Hello @@name@@, Your order for @@product@@ will be available at @@time@@. Then regex was simply used to fill in the blanks. It avoids the complications and possible performance implications of evaluate. ~Brad -----Original Message----- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 10:28 AM To: CF-Talk Subject: Re: Populating a variable stored in a database Brad Wood wrote: > To dynamically create CF code I would suggest writing it to a file and > cfincluding it. An even better solution though if you have a known set > of possible values would be to do a series of find and replaces on the > string replacing #rate# with the actual rate etc. > > ~Brad > It is also posible to use the correct combonation of evalutat() and DE() [delay evaluate] functions in cases such as this. Ian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299968 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4