tracker issue : CF-3037172

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

Bug 74796:(Watson Migration Closure)Query()

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Daryl Banttari / Daryl Banttari (cfprimer_guy)

Created: 01/06/2009

Components: Database, CFQuery

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 1

Problem:

Query().setSQL() does not automatically escape quotes the way <cfquery> does.  Not sure if this is really a "bug" per se, but didn't want the behavior to go unlogged.

For my two cents, I'd hope people would used named or numbered parameters when using setSQL().
Method:

name = "Daryl's Test";
qry = new Query();
qry.setDatasource("testDSN");
qry.setSQL("SELECT * FROM TestTable WHERE Name = '#name#'");
qry.execute();
Result:

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

Watson Bug ID:	3037172

External Customer Info:
External Company:  
External Customer Name: Daryl Banttari
External Customer Email: 63180D784462A9A5992015D5
External Test Config: 01/06/2009

Attachments:

Comments:

Sorry, this was a dupe of 73335.
Vote by External U.
24286 | November 10, 2011 07:11:01 PM GMT