Per the good Jason Dean at www.12robots.com:

<cfqueryparam(.?[^(cf_sql_type)])+?>

Tested against these:

<cfqueryparam value="foo" />
<cfqueryparam value="foo">
<cfqueryparam value="#foo#"
>
<cfqueryparam value="foo" cfsqltype="cf_sql_integer" />
<cfqueryparam cfsqltype="cf_sql_integer" value="foo" />

And the first three match.


andy

 

-----Original Message-----
From: Greg Morphis [mailto:gmorp...@gmail.com] 
Sent: Friday, May 28, 2010 1:39 PM
To: cf-talk
Subject: CF regex question [SOT]


I just ran into a problem with some old code one of team mates did. He used
<cfqueryparams but did not specify a cfsqltype. We upgraded our DB from
Oracle 9i to 10g and all of the sudden we're getting Error Executing
Database Query errors. Logs show A nonnumeric character was found when
expecting a numeric character.
One of the queries had a date column and the cfqueryparam looked like
"<cfqueryparam value="foo" /> no cfsqltype and according to the docs it's
default is CF_SQL_CHAR.
So I need to go through the 1321 <cfqueryparams and look for ones with no
cf_sql_type.
Is there a regex I can throw into Eclipse to help find these queries?

Thanks!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334096
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to