ScottInTexas
10-14-2003, 01:53 PM
All other fileds in this form get inserted into my DB. If I include the last (request.form("desc")) which is a textarea, I get;
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/infoForm.asp, line 185
But I can't see what is wrong with it. This is the same as the comments section. Please someone, look at this and spot my error for me?
Sub InsertInquirySecondary()
Dim sql
response.write("Inserting secondary")
sql="INSERT INTO Inquiries (comments,survType,vol,page,Desc)"
sql=sql & " VALUES "
sql=sql & "('" & request.form("comments") & "',"
sql=sql & "'" & request.form("survType") & "',"
sql=sql & "'" & request.form("vol") & "',"
sql=sql & "'" & request.form("page") & "',"
sql=sql "'" & request.form("desc") & "');"
dbCnxn.Execute sql
End Sub
the form parts
<td class="field" colspan=4><textarea Rows="4" cols="59" name="Desc"><% =server.htmlEncode(Desc) %></textarea></td>
<td class="field" ><input style="width=100%;" type="text" name="vol" value="<% =server.htmlEncode(vol) %>"></td>
<td class="field" ><input style="width=100%;" type-"text" name="page" value="<% =server.htmlEncode(page) %>"</td>
<td class="field" colspan=><input style="width=100%;" name="survType" value="<% =server.htmlEncode(survType)%>" /></td>
Thanks for the help.
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/infoForm.asp, line 185
But I can't see what is wrong with it. This is the same as the comments section. Please someone, look at this and spot my error for me?
Sub InsertInquirySecondary()
Dim sql
response.write("Inserting secondary")
sql="INSERT INTO Inquiries (comments,survType,vol,page,Desc)"
sql=sql & " VALUES "
sql=sql & "('" & request.form("comments") & "',"
sql=sql & "'" & request.form("survType") & "',"
sql=sql & "'" & request.form("vol") & "',"
sql=sql & "'" & request.form("page") & "',"
sql=sql "'" & request.form("desc") & "');"
dbCnxn.Execute sql
End Sub
the form parts
<td class="field" colspan=4><textarea Rows="4" cols="59" name="Desc"><% =server.htmlEncode(Desc) %></textarea></td>
<td class="field" ><input style="width=100%;" type="text" name="vol" value="<% =server.htmlEncode(vol) %>"></td>
<td class="field" ><input style="width=100%;" type-"text" name="page" value="<% =server.htmlEncode(page) %>"</td>
<td class="field" colspan=><input style="width=100%;" name="survType" value="<% =server.htmlEncode(survType)%>" /></td>
Thanks for the help.