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" _
& " inner join ClassTop c on c.ModuleID=m.ID" _
& " inner join ClassInstructors ci ON c.ID=ci.ClassID" _
& " inner join Instructors i ON ci.InstructorID=i.ID" _
& " inner join LocationTop L on L.ID=c.LocationID" _
& " inner join Delivery d on c.DeliveryID=d.ID" _
& " where c.ID=" & sClassID
set rs = DBRecordset(query)
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 4 10772
add
If Not rs.EOF
before you do anything.
"peashoe" <pe*****@yahoo.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.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.IsHandApproved
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 ClassInstructors ci ON c.ID=ci.ClassID" _
& " inner join Instructors i ON ci.InstructorID=i.ID" _
& " inner join LocationTop L on L.ID=c.LocationID" _
& " inner join Delivery d on c.DeliveryID=d.ID" _
& " where c.ID=" & sClassID
set rs = DBRecordset(query)
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
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.IsHandApproved 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 ClassInstructors ci ON c.ID=ci.ClassID" _
& " inner join Instructors i ON ci.InstructorID=i.ID" _
& " inner join LocationTop L on L.ID=c.LocationID" _
& " 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.
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.
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~ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
| |