Copy link to clipboard
Copied
Trying,
select ... from <cfqueryparam value="#leftside#" cfsqltype="CF_SQL_CHAR" maxlength="19">...
I am getting an error that I must declare table variable @p14. Leftside is initialized in ColdFusion.
Tried declare @p14 var(19) as the first line in the cfquery, right before the query itself, but got error saying @p14 was already declared.
How do you make this work ?
You need to understand the difference between the SQL and the parameters being passed to the SQL.
Reading this might help: http://adamcameroncoldfusion.blogspot.co.uk/2012/07/what-one-can-and-cannot-do-with.html
--
Adam
Copy link to clipboard
Copied
I believe that you can only use CFQueryParam in the WHERE clause of queries.
Copy link to clipboard
Copied
You need to understand the difference between the SQL and the parameters being passed to the SQL.
Reading this might help: http://adamcameroncoldfusion.blogspot.co.uk/2012/07/what-one-can-and-cannot-do-with.html
--
Adam
Find more inspiration, events, and resources on the new Adobe Community
Explore Now