tracker issue : CF-3040225

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 80210:If you use Query

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)

Created: 09/28/2009

Components: Language, CF Component

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 270817

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Problem:

If you use Query.cfc and your query contains both single quotes and a bound parameter, the CFC gets confused by the single quotes. Consider the code block below. It will not replace the bound param.
Method:

<cfscript>q = new com.adobe.coldfusion.query();q.setDatasource("cfartgallery");q.setSQL("  select * from art where artname like '' or  price < :price");q.addParam(name="price",value="100000",cfsqltype="cf_sql_integer");r = q.execute();writeDump(r); </cfscript>
Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3040225

External Customer Info:
External Company:  
External Customer Name: Raymond Camden
External Customer Email: 5FBC41E943BD265C992015D5
External Test Config: 09/28/2009

Attachments:

Comments:

+1 vote. I think this is a fairly common situation, too. -- Adam
Vote by External U.
22789 | November 11, 2011 12:37:23 AM GMT