...

View Full Version : Need help



rohmanovich
12-29-2004, 01:26 AM
Every time I run the script below, I get "No update permissions!"

Thanks in advance.


<html>
<body>

<h2>Update Record</h2>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.mapPath("chem.mdb"))

cid=Request.Form("submit")
response.write(Request.Form("test1"))
jon = 1
response.write(jon)

if Request.form("test1")<>"" then

sql="UPDATE NEWS SET "
sql=sql & "DATE='" & now() & "',"
sql=sql & "CONTENT='" & Request.Form("test1") & "'"
sql=sql & " WHERE ID='" & jon & "'"
on error resume next
conn.Execute sql, Recordsaffected
if err<>0 then
response.write("No update permissions!")
else
response.write("Record " & cid & " was updated!")
end if
end if
conn.close
%>

</body>
</html>

tboss132
12-29-2004, 09:24 AM
Need help
Hi rohmanovich, my first advise to you is never to name a thread "Need help" It's against our posting guidelines. See http://www.codingforums.com/postguide.htm for the complete list of guidelines.
Now to your question, I'll advise you to remove the error handler so you can see the specific error message that occurs.
In order words, remove these lines


on error resume next
and

if err<>0 then
response.write("No update permissions!")
else
response.write("Record " & cid & " was updated!")
end if
By so doing, you'll get the specific error message. Revert back to us with the error message if you're still having problems.
Cheers

Bullschmidt
12-31-2004, 01:59 AM
And it sounds to me like your Web host should have some kind of admin area for you to use or else you might have to call or e-mail them what you want. The anonomous Internet user needs write permissions on the virtual folder.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum