473,411 Members | 2,164 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,411 software developers and data experts.

ASP code error with SQL server databases

Hey,
I am getting the following error when I try to delete the contents
of a recordset under a condition statement. Is there any way I can
delete them without running into this error?
I need to delete the contents in the recordset 'rs' to delete the
items from the shopping cart once the order is placed.
Thanks, Amit

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation
of the provider, or of the selected locktype.
/FacLog/cartdisplay1.asp, line 370
Relevant code:
sql = "Select UserName,Code, Title From TempCartTable WHERE UserName=
'" & strName & "' ORDER BY Code"
set rs = db.execute(sql)

if session ("OrderPlaced") = "true" then
Response.Write " <div align = center> <font color=#FF0000><b>
<h2> Your Cart is Presently Empty !!! </h2> <b> </font> <div>"
end if

' Get all the Instructor Selections from TempCartTable
if session ("OrderPlaced") = "false" then
If not rs.eof Then
'Response.Write rs("title")
Response.Write "<h3> Database Requests </h3>"
Response.Write "<br><table border='1'>"
Response.Write "<tr> <td><div align=center><b> Remove
</b></div></td> <td><div align=center><b> Code </b></div></td>
<td><div align=center><b> Title </b></div></td> <td><div
align=center><b> Course Details </b></div></td> <td><div
align=center><b> Date Requested For </b></div></td><td><div
align=center><b> Comments </b></div></td>"
row=0

while not rs.eof
Response.write(flag)
row=row+1

Response.Write "<tr><td width='15'><a
href='cartdisplay1.asp?Remove="
Response.Write rs("Code")
Response.Write "'><img src='/images/dot03.jpg'></a></td><td>"
Response.Write rs("Code")
Response.Write "</td>"
Response.Write "<input type=hidden name='Code" & row
Response.Write "' Value='"
Response.Write rs("Code")
Response.Write "'>"
Response.Write "<td><a target=_parent href='FacMenuFS.html?Code="&
rs("Code") & "'><font color='#006699'>"
Response.Write rs("Title")
Response.Write "</font></td> <div align=center><td>"
Response.Write "<input type=hidden name=""Title" & row
Response.Write """ Value=""" & Server.HtmlEncode(rs("Title"))
Response.Write """>"
Jul 19 '05 #1
1 3745
Use a DELETE statement to affect data.

conn.execute "DELETE table WHERE key=" & key,,129

Not only does it avoid the problem you're having, it is also more efficient.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Amit Kela" <am*******@colorado.edu> wrote in message
news:8e**************************@posting.google.c om...
Hey,
I am getting the following error when I try to delete the contents
of a recordset under a condition statement. Is there any way I can
delete them without running into this error?
I need to delete the contents in the recordset 'rs' to delete the
items from the shopping cart once the order is placed.
Thanks, Amit

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation
of the provider, or of the selected locktype.
/FacLog/cartdisplay1.asp, line 370
Relevant code:
sql = "Select UserName,Code, Title From TempCartTable WHERE UserName=
'" & strName & "' ORDER BY Code"
set rs = db.execute(sql)

if session ("OrderPlaced") = "true" then
Response.Write " <div align = center> <font color=#FF0000><b>
<h2> Your Cart is Presently Empty !!! </h2> <b> </font> <div>"
end if

' Get all the Instructor Selections from TempCartTable
if session ("OrderPlaced") = "false" then
If not rs.eof Then
'Response.Write rs("title")
Response.Write "<h3> Database Requests </h3>"
Response.Write "<br><table border='1'>"
Response.Write "<tr> <td><div align=center><b> Remove
</b></div></td> <td><div align=center><b> Code </b></div></td>
<td><div align=center><b> Title </b></div></td> <td><div
align=center><b> Course Details </b></div></td> <td><div
align=center><b> Date Requested For </b></div></td><td><div
align=center><b> Comments </b></div></td>"
row=0

while not rs.eof
Response.write(flag)
row=row+1

Response.Write "<tr><td width='15'><a
href='cartdisplay1.asp?Remove="
Response.Write rs("Code")
Response.Write "'><img src='/images/dot03.jpg'></a></td><td>"
Response.Write rs("Code")
Response.Write "</td>"
Response.Write "<input type=hidden name='Code" & row
Response.Write "' Value='"
Response.Write rs("Code")
Response.Write "'>"
Response.Write "<td><a target=_parent href='FacMenuFS.html?Code="&
rs("Code") & "'><font color='#006699'>"
Response.Write rs("Title")
Response.Write "</font></td> <div align=center><td>"
Response.Write "<input type=hidden name=""Title" & row
Response.Write """ Value=""" & Server.HtmlEncode(rs("Title"))
Response.Write """>"

Jul 19 '05 #2

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

Similar topics

3
by: Steven Scaife | last post by:
Below is my ASP page, I have changed the update to read DRIAL which doesn't exist, shouldnt this throw an error, or if the connection cannot be made shouldnt it throw an error as well thanks in...
11
by: Taishi | last post by:
Andy, I am new to SQL. It was hard just to figure out how to install it. I know I am logged in as a Admin. in Windows. I have the little server box with the round circle on it in the bottom...
1
by: Steven | last post by:
This is complicated so I will try to be specific. Server: W2K DB2 V8.1 fixpack 4 Instances: DB2 databases TOOLSDB, DBDC DEV databases SURVEY, QUALDEV, DBDCDEV STAGE databases WSWSTAGE, TEMP I am...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
6
by: John | last post by:
Hi I have a front-end/back-end access app. I have created a replication set between the backend on a server an the backend on a laptop. My question is; How can I cause the synchronisation to...
21
by: Peter Nurse | last post by:
I have just upgraded to SQL Server 2005 from SQL Server 2000. In Microsoft SQL Server Management Studio, when I click on database properties, I receive the following error:- Cannot resolve the...
18
by: NEWSGROUPS | last post by:
I work for a large organization were my team has developed 2 very substantial databases in Access 2000. These databases have been working fine for the last 6 years with minimal issues or problems....
4
by: Mark D Powell | last post by:
While I was out of the office the Lan Team moved one of my SQL Server 2000 servers to a new network domain. Since then the maintenance job has not ran. The error log for the SQL Agents has the...
5
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
0
by: Toralf Kirsten | last post by:
Hi all, we have installed DB2 V9.5 Trial on a Fedora 6 Linux box (32bit). Since the box is included in a NIS we have manually created db2 users db2inst, dasusr and db2fenc on this box (not in the...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.