Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-29-2004, 12:26 AM   PM User | #1
rohmanovich
New to the CF scene

 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
rohmanovich is an unknown quantity at this point
Need help

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>
rohmanovich is offline   Reply With Quote
Old 12-29-2004, 08:24 AM   PM User | #2
tboss132
Regular Coder

 
Join Date: Oct 2004
Location: In front of this computer. (Where else?)
Posts: 442
Thanks: 0
Thanked 0 Times in 0 Posts
tboss132 is an unknown quantity at this point
Quote:
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

Code:
 on error resume next
and
Code:
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
__________________
Tomorrow is the first day of the rest of your life... What have you done today?
Tutorials
Web: w3schools, htmldog General tips: Hardware, Networking

Last edited by tboss132; 12-29-2004 at 08:26 AM.. Reason: typo
tboss132 is offline   Reply With Quote
Old 12-31-2004, 12:59 AM   PM User | #3
Bullschmidt
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 478
Thanks: 0
Thanked 2 Times in 2 Posts
Bullschmidt is an unknown quantity at this point
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.
__________________
J. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
Bullschmidt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:10 PM.


Advertisement
Log in to turn off these ads.