× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
funfun reported 2014-10-06T21:32:32Z  · SachinPrakash last modified 2016-10-27T03:48:33Z

Parameter substitution does not work in Query Analyzer when parameter name continas single quote


Priority Low
Complexity Unknown
Component Q Analyzer - Parameterized Scripts
Version Future - 0.1

I run into this problem while working on VA's parameterized query feature.

According to AFParameterParser's document, quotes can be part of a parameter name as long as quote is escaped with backslash. But this does not seems to work in Query Analyzer, below are steps to reproduce the problem using 15.0.7-23 build:

(1) Open a Query Analyzer to SQL Server running on xxx.xxx.11.54 with database = Northwind, schema = dbo
(2) Type the following query in the opened Query Analyzer window and execute it:
        select * from Orders where OrderID = 10248
--> One row is retrieved from the server
(3) Modify above query and replaced 10248 with &"param\'s name", i.e. the query becomes
        select * from Orders where OrderID = &"param\'s name"
(4) In query panel's toolbar, click "Parameterized Script" icon (the last icon) to turn it on.
(5) Execute the query
--> Parameters dialog pops up
    . Name column: param\'s name
    . Value column: empty
--> Type in 10248 in Value column and click Execute button.
==> Query is executed with the following message displayed in the Messages tab:
>•[Error] •Script lines: 10-11 ----------------------
 Line 1: Incorrect syntax near '='.
 •Msg: 170, •Level: 15, •State: 1, •Procedure: , •Line: 1

 •[Executed: 10/6/2014 2:26:03 PM] [Execution: 14•ms]

It seems that parameter is not substituted correctly with user provided value.

Issue #12541

Closed
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017