I am new to ASP and am getting this error when i try to run the page
below. Any assistance would be most welcome.
Thanks
Nick Truscott
----------------------------
Microsoft VBScript compilation error '800a03ea'
Syntax error
/njtruscott/check_message.asp, line 30
Else
^
-----------------------------
<%
message_from = Replace(Request("from"), "'", "''")
message_subject = Replace(Request("subject"), "'", "''")
message_body = Replace(Request("message"), "'", "''")
message_from = Replace(message_from, "<", "<")
message_subject = Replace(message_subject, "<", "<")
message_body = Replace(message_body, "<", "<")
message_type = Request("message_type")
message_parent = Request("parent_id")
If Len(message_subject) > 200 Then Response.Write("The subject is too
long.")
Response.End
End If
If message_subject = "" Then Response.Write("You have not entered a
subject.")
Response.End
End If
If message_body = "" Then Response.Write("You have not entered a
message")
Response.End
End If
Set Con = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" &
Server.MapPath("\---------\db\**********.mdb") & ";" & _
"Persist Security Info=False"
Con.Open(sConnection)
query = "INSERT INTO messages (message_type, message_from,
message_subject, message_body, "
If message_type = "thread" Then query = query & "message_forum)"
Else
query = query & "message_thread)"
End If
query = query & " VALUES ('" & Ucase(message_type) & "', '" &
message_from & "', '" & message_subject & "', '" & message_body & "'"
& ", " & message-parent & ")"
Con.Execute query
Con.Close
Set Con = Nothing
If message_type = "thread" Then Response.Redirect
"view_forum.asp?id="&message_parent
Else
Response.Redirect "view_message.asp?id="&message_parent
End If
%>