This is a little thing I snuck in to the query stuff.  It will replace a field with a given _expression_.  I used it to support encrypted colums in mysql 2005.  Here’s an example:

 

<cfset query.setFieldExpression("Consumer", "firstName", "Convert(varchar, DecryptByKeyAutoCert(cert_id('MyCertName'), NULL, firstName))", "cf_sql_varchar") />

 

The first argument is the table

 

The second is the field

 

The third is what _expression_ to replace the field with

 

The fourth is the data type to treat the field as for cfquery param. 

 

It’s a bit of a hack, but it makes some things possible that weren’t otherwise.

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken Dunnington
Sent: Thursday, March 23, 2006 11:03 AM
To: [email protected]
Subject: [Reactor For CF] query.setFieldExpression()

 

Can someone briefly explain what the function does? Specifically, what values one might use for the "_expression_" argument?
Thanks!
 - Ken
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to