I've tried whichever way to tease relevant data from my database by
making the selected project a necessary condition for the data to
qualify for inclusion. Here's one example:
Query Of Queries syntax error.
Encountered "Project. Incorrect conditional expression, Incorrect
conditional expression, Lexical error at line 0, column 0. Encountered:
"\"" (34), after : ""
The error occurred in
C:\CFusionMX7\wwwroot\Awards\Forms\edit_GroupAwardNomination_FORM.cfm:
line 414
Called from
C:\CFusionMX7\wwwroot\Awards\Forms\edit_GroupAwardNomination_FORM.cfm:
line 1
Called from
C:\CFusionMX7\wwwroot\Awards\Forms\edit_GroupAwardNomination_FORM.cfm:
line 414
Called from
C:\CFusionMX7\wwwroot\Awards\Forms\edit_GroupAwardNomination_FORM.cfm:
line 1
412 : SELECT Project, FirstName, LastName
413 : FROM Nominations
414 : WHERE Project = "#SelectedProject#"
415 : </cfquery>
416 : <cfset counter = 0 />
(Of course it works when I substitute the value of #SelectedProject# in
the place of the variable. I just don't know how to the programming
code substitute it in the WHERE statement so that it works.)
As witnnessed by the following code line, my ColdFusion debugger
somehow knows the properly parsed name of the project passed to the
second page and even shows it in the WHERE statement:
SQL SELECT Project, FirstName, LastName FROM Nominations
WHERE Project = "<cfoutput>Fox River Team </span></cfoutput>"
Why then am I getting the error?
I have also tried, among other things,
WHERE Project IN (<cfqueryparam cfsqltype="cf_sql_longvarchar"
value="#SelectedProject#" list="yes" separator=",">)
This does not result in an error, but in no results being displayed at
all.
Can you, would you help? Thanks.
Firstly you might want to try the following for your cfset:
<cfset SelectedProject = '#ArrayGroupAwards[8]#'>
You don't need the <cfoutput> tags when assigning variables.
Now if for some reason - that doesn't fix you up,
please include a few more details in your email.
Ie. How you create the instance of your CFC
Whether or not the code you're running is in a function,
How you're calling / using the function.
Any and all of these things could have an effect a successful outcome.
Thanks for taking the time to respond.
I took out the cfoutput tags. It didn't help. I sent you the two pages
in case you have the time and the inclination to look them over for me.
:-)