tracker issue : CF-4199516

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

QueryExecute breaks when question mark inside square brackets with Lesser number (1) of positional parameters are defined for sql query

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Chris Hopkins / Chris Hopkins ()

Created: 08/21/2017

Components: Database, CFQuery

Versions: 11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 11,0,12,302575 / 311735

Priority/Frequency: Normal /

Locale/System: / Windows 10

Vote Count: 0

Problem Description:

When using a questionmark inside of square brackets in a query using queryExecute the error "Error while Parsing SQL query string. Lesser number (1) of positional parameters are defined for sql query" is thrown.

Use case is a little edge case but i am using TSQL like matching to match [/?] in a column

Steps to Reproduce:
{code}
<cfscript>
qry = "SELECT '[?]' as screwy FROM table WHERE id = :id";
QueryExecute( qry , { id={ cfsqltype="cf_sql_integer", value="1" }} ,{datasource:'core'});
</cfscript>
{code}
 

Note this is VERY similar to a closed/fixed bug [https://tracker.adobe.com/#/view/CF-4000264] where someone has the same issue but just with a question mark in the query

Actual Result:

Error while Parsing SQL query string. Lesser number (1) of positional parameters are defined for sql query':'

Expected Result:

Query to run

Any Workarounds:

Attachments:

Comments:

Is there any idea on when this will be fixed?
Comment by Chris H.
27733 | May 10, 2018 10:35:30 AM GMT