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

access_asp Error Type:ADODB.Recordset (0x800A0CB3)

Hi,
I m getting this message after executing the following code
Expand|Select|Wrap|Line Numbers
  1. <%
  2. CALL OPENDATACON
  3. DIM RS
  4. SET RS=SERVER.CreateObject ("ADODB.RECORDSET")
  5. s="select * from dbpassenger order by ref_no"
  6. CALL OPENRS(RS,S)
  7. DIM RS1
  8. dim aa
  9. SET RS1=SERVER.CreateObject ("ADODB.RECORDSET")
  10. s="select * from dbfare where flight_id='" & session("fid") & "'"
  11. CALL OPENRS(RS1,S)
  12. if rs.RecordCount >0 then
  13. rs.MoveLast
  14. aa=rs("ref_no") + 1
  15. else
  16. aa=1
  17. end if
  18. session("ref_no")=aa
  19. DIM XX
  20. xx=0
  21. <%    if  len(trim(request("txtfname1")))>0 then
  22.         RS.AddNew ' I m getting error on this line
  23.         rs("ref_no")=CINT(aa)
  24.         rs("flight_id")=session("fid")
  25.         rs("first_name")=request("txtfname1")
  26.         rs("last_name")=request("txtlname1")
  27.         rs("sex")=request("sex1")
  28.         rs("age")=request("TXTage1")
  29.         if request("TXTage1")<12 then
  30.             xx=xx+rs1("fare_child")
  31.         else
  32.             xx=xx+ rs1("fare_adult")
  33.         end if
  34.  
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype

I m using SQL Server 2000 with asp.
here ref_no is numeric
May 6 '07 #1
3 5676
jhardman
3,406 Expert 2GB
it looks like you are opening the db without the correct lock type. Try this:
Expand|Select|Wrap|Line Numbers
  1. DIM RS,RS1, objConn
  2. set objConn = server.createObject("ADODB.Connection")
  3. SET RS=SERVER.CreateObject ("ADODB.RECORDSET")
  4. s="select * from dbpassenger order by ref_no"
  5. RS.open s, objConn, adOpenDynamic, adLockOptimistic
  6.  
Let me know if this helps.

Jared
May 7 '07 #2
CALL OPENDATACON
DIM RS,RS1, objConn
set objConn = server.createObject("ADODB.Connection")
SET RS=SERVER.CreateObject ("ADODB.RECORDSET")
s="select * from dbpassenger order by ref_no"
RS.open s, objConn, adOpenDynamic, adLockOptimistic'Now showing
'error on this line
'DIM RS
'SET RS=SERVER.CreateObject ("ADODB.RECORDSET")
's="select * from dbpassenger order by ref_no"
'CALL OPENRS(RS,S)
'DIM RS1
dim aa
SET RS1=SERVER.CreateObject ("ADODB.RECORDSET")
s="select * from dbfare where flight_id='" & session("fid") & "'"
CALL OPENRS(RS1,S)
if rs.RecordCount >0 then
rs.MoveLast
aa=rs("ref_no") + 1
else
aa=1
end if
session("ref_no")=aa
DIM XX
xx=0

Error Type:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
May 8 '07 #3
<%@ Language=VBScript %>
<!-- #INCLUDE FILE="FLIGHT.inc" -->
<!--#include file="ADOVBS.inc"-->
<%=header%>
<br><br>
<%
CALL OPENDATACON
DIM RS
SET RS=SERVER.CreateObject ("ADODB.RECORDSET")
s="select * from dbpassenger order by ref_no"
CALL OPENRS(RS,S)
DIM RS1
dim aa
SET RS1=SERVER.CreateObject ("ADODB.RECORDSET")
s="select * from dbfare where flight_id='" & request.querystring("id") & "'"
CALL OPENRS(RS1,S)
if RS.RecordCount >0 then
RS.MoveLast
aa=RS("ref_no") + 1
else
aa=1
end if
session("ref_no")=aa
DIM XX
xx=0
<% if len(trim(request("txtfname1")))>0 then
rs.AddNew 'Error for this line
rs("ref_no")=CINT(aa)
rs("flight_id")=session("fid")
rs("first_name")=request("txtfname1")
rs("last_name")=request("txtlname1")
rs("sex")=request("sex1")
rs("age")=request("TXTage1")
if request("TXTage1")<12 then
xx=xx+rs1("fare_child")
else
xx=xx+rs1("fare_adult")
end if

I even made changes to .inc file as suggested but achieved no success..
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
May 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tom Petersen | last post by:
I have been copying and pasting code and this has been working, but now I get this error: Error Type: ADODB.Recordset (0x800A0E7D) Operation is not allowed on an object referencing a closed or...
1
by: Chuck | last post by:
Hi! I have a ASP page that generates an excel report. It works fine if there are records found, however, if no records are found I would like to call the below listed function instead of getting...
1
by: Amit Kela | last post by:
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...
8
by: Drew | last post by:
This is a weird error, it seems if we reboot the web server, which is also the SQL server, I get this error, ADODB.Recordset (0x800A0E7A) Provider cannot be found. It may not be properly...
1
by: Jack | last post by:
Hi, I am trying to add a new record to a main page. This page is the processing page to a form. However, I am getting the following error message: Error Type: ADODB.Recordset (0x800A0BB9)...
2
by: ramia1983 | last post by:
All i am doing is trying to write info to a access database but iget this error Error Type: ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted....
1
by: DragonFields | last post by:
I'm hoping someone can help me. I keep receiving the ADODB.Command error '800a0cc1' error (Item cannot be found in the collection corresponding to the requested name or ordinal.) I found a couple...
3
by: dotnetdev1 | last post by:
Hi Friends, Wen I am rying to run my asp application....i am ending up with this following error... Error Type: ADODB.Recordset (0x800A0CC1) Item cannot be found in the...
1
by: shivasusan | last post by:
Hi Friends! Please Help me! How i can solve this error? Please explain me, what is the error and how to solve? Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.