473,785 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADODB.Field error '80020009' Cannot find record

I get the following error: ADODB.Field error '80020009' Either BOF or
EOF is True, or the current record has been deleted. Requested
operation requires a current record.

This is my code:
' Get if module is hand-approved or not.
query = "select *, m.Title as ModuleTitle, d.IsRanged, c.IsHandApprove d
as Approval, c.ApprovalDate as ApprovalDate, ci.InstructorID as UID,
i.Email, i.FirstName, i.LastName" _
& " from ModuleTop m" _
& " inner join ClassTop c on c.ModuleID=m.ID " _
& " inner join ClassInstructor s ci ON c.ID=ci.ClassID " _
& " inner join Instructors i ON ci.InstructorID =i.ID" _
& " inner join LocationTop L on L.ID=c.Location ID" _
& " inner join Delivery d on c.DeliveryID=d. ID" _
& " where c.ID=" & sClassID

set rs = DBRecordset(que ry)

if rs("Approval") = 1 then (It stops here with the error)
sRegCode = "A"
else
sRegCode = "B"
end if

I looked in my database - and the record is set to True, so why doesn't
it see it? I also tried
if rs("Approval") = "True" and that didn't work.

Thanks in advance
Lisa

Oct 11 '06 #1
4 10913
add

If Not rs.EOF

before you do anything.
"peashoe" <pe*****@yahoo. comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
>I get the following error: ADODB.Field error '80020009' Either BOF or
EOF is True, or the current record has been deleted. Requested
operation requires a current record.

This is my code:
' Get if module is hand-approved or not.
query = "select *, m.Title as ModuleTitle, d.IsRanged, c.IsHandApprove d
as Approval, c.ApprovalDate as ApprovalDate, ci.InstructorID as UID,
i.Email, i.FirstName, i.LastName" _
& " from ModuleTop m" _
& " inner join ClassTop c on c.ModuleID=m.ID " _
& " inner join ClassInstructor s ci ON c.ID=ci.ClassID " _
& " inner join Instructors i ON ci.InstructorID =i.ID" _
& " inner join LocationTop L on L.ID=c.Location ID" _
& " inner join Delivery d on c.DeliveryID=d. ID" _
& " where c.ID=" & sClassID

set rs = DBRecordset(que ry)

if rs("Approval") = 1 then (It stops here with the error)
sRegCode = "A"
else
sRegCode = "B"
end if

I looked in my database - and the record is set to True, so why doesn't
it see it? I also tried
if rs("Approval") = "True" and that didn't work.

Thanks in advance
Lisa

Oct 11 '06 #2
peashoe wrote:
I get the following error: ADODB.Field error '80020009' Either BOF or
EOF is True, or the current record has been deleted. Requested
operation requires a current record.

This is my code:
' Get if module is hand-approved or not.
query = "select *, m.Title as ModuleTitle, d.IsRanged,
c.IsHandApprove d as Approval, c.ApprovalDate as ApprovalDate,
ci.InstructorID as UID, i.Email, i.FirstName, i.LastName" _
& " from ModuleTop m" _
& " inner join ClassTop c on c.ModuleID=m.ID " _
& " inner join ClassInstructor s ci ON c.ID=ci.ClassID " _
& " inner join Instructors i ON ci.InstructorID =i.ID" _
& " inner join LocationTop L on L.ID=c.Location ID" _
& " inner join Delivery d on c.DeliveryID=d. ID" _
& " where c.ID=" & sClassID
Response.Write query
Response.End

Run the page, copy the query from the browser window and run it in the
query execution tool for your database. Do you get the correct results?
If not, change the sql so that it gives you the correct result. Now you
know what it has to look like. Go back to your asp page and modify the
code so that it generates the sql that works.

In the future, raising exceptions (errors) is expensive - never try to
read data from a recordset without checking its EOF property:

If not rs.EOF then
'process the data
else
'handle the no-data situation
end if
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Oct 11 '06 #3
I guess I should have explained a bit more - I have one record that is
True and one that is False. For some reason, when I do a
response.write( rs("Approval") ) - the False record shows, but the True
record gives the error. What would cause this?
gomer wrote:
add

If Not rs.EOF

before you do anything.

Oct 11 '06 #4
thanks everyone for your help - but I figured out the issue. It had
nothing to do with the approval - it was the fact that my query was
looking for instructors, and the one that wasn't working didn't have an
instructor - therefore rs.EOF was true.

Thanks guys!
~L~

Oct 11 '06 #5

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

Similar topics

0
3623
by: olivier Micheli | last post by:
Hello, I need help When I execute the following asp, I have the error message: ------------------------------- ADODB.Field error '80020009' BOF ou EOF est égal à True ou l'enregistrement actuel a été supprimé.
1
5398
by: Matthew Louden | last post by:
I tried to modify the field in my ASP page, and it yields the following error: I tried to use adLockOptimistic as follows, but still not working objRS.Open "pressrelease", objConn, adOpenDynamic, adLockOptimistic ADODB.Field error '800a0cb3' Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
0
1010
by: william | last post by:
Hi all, God help me. I have two COM+(developed by VB.NET, they're serviced components, belongs to different project ABCUtil and ABCSalary), com1, and com2. In com2, call com1 to do some calculations. com2 has three main functions, they are funcStatus which return a dataset holding member status information, funConfig which return member configuration information, and funProcess which processes member action( this function use datasets...
5
3906
by: touf | last post by:
Hi, I'm having this error when I try to open a report (Crystal reports) on the client machine (It works fine on my developpement machine) It's a window application (not a web), On the client machine the framwork was installed using a VB.net CD's that doesn't contain Crystal, but The application is installed by an installer generated from my machine using vs.net 2002. I've found somewhere on google that this is an error related to web...
2
4818
by: clevsone | last post by:
ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /admin/database.asp, line 180 I am currently getting this error? I'm using an access database.
15
28824
by: Bjorn Jensen | last post by:
Hi! An beginner question: Pleas help me with this (-: Error (the arrow points on the s in sqrt) ===== tal.java:6: cannot find symbol symbol : method sqrt(int) location: class tal System.out.println(i + ": " + sqrt(4));
0
408
by: peashoe | last post by:
I get the following error: ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. This is my code: ' Get if module is hand-approved or not. query = "select *, m.Title as ModuleTitle, d.IsRanged, c.IsHandApproved as Approval, c.ApprovalDate as ApprovalDate, ci.InstructorID as UID, i.Email, i.FirstName, i.LastName" _ & " from ModuleTop m" _
0
1628
by: DongWook | last post by:
Dear all, I've a windows application with crystal viewer to show a report (using vb .net 2003). I made a setup project and installed on client machines (no .net and crystal report). The application works just fine till my client logon to domain then this error popup "Cannot find KeycodeV2.dll or invalid keycode " when trying to show report. I've read other topics about this issue, all said about missing merge module or license key but I...
1
1684
by: matthew brown | last post by:
class Temperature{ // Convert temperature from Fahrenheit to Centigrade //Author : Samuel N. Kamin, June 1 , 1996 public static void main(Stringargs) { int temperature; //The Fahrenheit temperature System.out.print("Please type the temperature (deg F) : "); temperature = keyboard.readInt(); System.out.print(temperature);
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10330
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10153
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9952
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8976
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.