473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Updateing a record

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

Feb 2 '06 #1
1 1118
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)
Feb 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Rick | last post by:
Hi all, Is there a MySQL function to get the first record through a query? I would like to open a page of client records with the first one shown. The other records can be accessed from a...
0
by: Reggie | last post by:
Hi and TIA! I have a form were the using can reset the priority of the record. I then want to add or subtract 1 from the other records depending on what they change it to. Example: Form...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
7
by: Jake | last post by:
Hi all, I am trying to update an SQL server table from a dataset populated by an excel spread sheet. Each record has a check box so it can be excluded from the SQL server table population. ...
2
by: Mark Reed | last post by:
Hi All, I have created a multi-user application at work which is working perfectly apart from a small problem which I believe to more a of a user issue (maybe some will set me straight on that...
11
khalidbaloch
by: khalidbaloch | last post by:
hi : all Friend i am a new member of this comunity as well in php myqsl i want learn that how to dispaly three or two record from a mysql table for example .. mysql table category has 21 columns,...
3
prn
by: prn | last post by:
Hi folks, I've got something that's driving me crazy here. If you don't want to read a long explanation, this is not the post for you. My problematic Access app is a DB for keeping track of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.