Whenever i try to update a record i always get the dreaded "No
permissions"
here is my updates statement. Please help.

Function updateData()
cid = Request.QueryString("wrkstaID")
sql="UPDATE work_station SET "
sql=sql & "workstation='" & Request.QueryString("workstation") & "',"
sql=sql & "cpu='" & Request.QueryString("cpu") & "',"
sql=sql & "memory='" & Request.QueryString("memory") & "',"
sql=sql & "hard_Drive='" & Request.QueryString("harddrive") & "',"
sql=sql & "servicepack='" & Request.QueryString("servicepack") & "',"
sql=sql & " WHERE work_StationID='" & cid & "'"
on error resume next
conn.Execute sql
if err<>0 then
response.write("No update permissions!")
else
response.write("Record " & cid & " was updated!")
updateData = True
end if
'conn.close

End Function

Re: Updateing a record by Evertjan

Evertjan
Thu Feb 02 12:16:59 CST 2006

Magua wrote on 02 feb 2006 in microsoft.public.inetserver.asp.general:

> Whenever i try to update a record i always get the dreaded "No
> permissions"
> here is my updates statement. Please help.
>
> Function updateData()
> cid = Request.QueryString("wrkstaID")
> sql="UPDATE work_station SET "
> sql=sql & "workstation='" & Request.QueryString("workstation") & "',"
> sql=sql & "cpu='" & Request.QueryString("cpu") & "',"
> sql=sql & "memory='" & Request.QueryString("memory") & "',"
> sql=sql & "hard_Drive='" & Request.QueryString("harddrive") & "',"
> sql=sql & "servicepack='" & Request.QueryString("servicepack") & "',"
> sql=sql & " WHERE work_StationID='" & cid & "'"
> on error resume next
> conn.Execute sql
> if err<>0 then
> response.write("No update permissions!")
> else
> response.write("Record " & cid & " was updated!")
> updateData = True
> end if
> 'conn.close
>
> End Function
>

You could be catching all other kinds of errors!

Change:

conn.Execute sql

to:

debug = true
if debug then
response.write sql
response.end
else
conn.Execute sql
end if

and show us the output.

btw, also tell us the type of database engine and your
set con =
line


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)