Hey everyone;
Again - my mind is mush this week (hurray for sleeping in on a Saturday). Anyways -
The problem is the SQL chokes because of ' characters in a form field I'm passing to
it. Normally I can work with this, but because I'm doing a call against a dynamically
generated variable, it keeps hacking on me.
Here's code:
<CFOUTPUT query="Questions_List">
<CFSET findmatch = "num#questions_list.QuestionID#">
<CFSET findvalue = "form.num#questions_list.QuestionID#">
<CFIF #isdefined(findmatch)#>
<CFquery Datasource="#AppPDS#">
Insert INTO QuestionResponse
(ConsultantID, QuestionID, Response, QuestionnaireResponseID)
Values
('#szCandidateID#', '#Questions_List.QuestionID#', '#evaluate(findvalue)#',
'#New_ID.newnumber#')
</cfquery>
</cfif>
</cfoutput>
As you can see, I'm doing a dynamic check against a variety of form.fields that may or
may not be returned. So when inserting into the Response field, I have(?) to run an
evaluate. This evaluate returns the data (text) that sometimes includes the '
character. When it does, the insert statement hacks and dies.
How can I adjust the SQL (or something else) to get around this problem? Any
suggestions? I totally appreciate any and all assistance on this issue.
Stephen R. Cassady
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists