Operation must use an updateable query?
am 22.09.2005 15:29:21 von Spencer HurstI keep getting the error: "operation must use an updateable query" when
i try to execute the following code:
<%
p_name = Request("p_name")
p_email = Request("p_email")
p_comment = Request("p_comment")
%>
<% if p_name = "e.g: Spencer Hurst" then
Response.Redirect
"/homepage/guestbook/guestbook_entry.asp?retry=name"
else if p_name = "" then
Response.Redirect
"/homepage/guestbook/guestbook_entry.asp?retry=name"
else if p_email = "" then
Response.Redirect
"/homepage/guestbook/guestbook_entry.asp?retry=email"
else if p_comment = "" then
Response.Redirect
"/homepage/guestbook/guestbook_entry.asp?retry=comment"
else
set datBase = Server.CreateObject ("ADODB.Connection")
Const cDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
datBase.Open cDSN & Server.MapPath (cMDB)
const cMDB = "spencer.mdb"
theSQL = "insert into guestbookentry"
theSQL = theSQL & "(name, email, comment)"
theSQL = theSQL & "values ('"&p_name&"', '"&p_email&"',
'"&p_comment&"')"
datBase.Execute (theSQL)
datBase.Close
set datBase = Nothing
Response.Write "
Guestbook Entry
submitted.
"submitted.
Response.Write "
Thank you for your entry, the guestbook has now
been updated. If you wish you may
href='/homepage/guestbook/guestbook.asp'>view the guestbook."
end if
end if
end if
end if
%>
the error points to this line: datBase.Execute (theSQL)
Does anybody see a problem that i am missing or know a solution?
Regards
Spencer
*** Sent via Developersdex http://www.developersdex.com ***