I am using Cold Fusion to develop a questionnaire and process the results. I am trying to insert the responses into a database. I have one form variable, #form.Level# that is causing the insert to fail. I tested it to make sure it was numeric, and that the field in the database was numeric. The insert is shown below:
Thanks in advance for any assistance!
Code:
cfif IsNumeric(#Form.Level#)>
<cfoutput>The level is numeric.</cfoutput>
<cfelse>
<cfoutput>The level is text.</cfoutput>
</cfif>
<CFQUERY NAME="RecordResults" DATASOURCE="Question">
INSERT INTO ATable
(
SurveyID,
QNumber,
Answer,
Level,
Comments
)
values
(
'#form.SurveyID#',
'#form.QNumber#',
'#form.Answer#',
'#form.Level#',
'#form.Comments#'
)
</CFQUERY>