|
 |
access thread: database error in asp page
Message #1 by "Madhusara Mopuri" <MMopuri@c...> on Fri, 18 May 2001 13:49:45
|
|
Error Type:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/EHDetail.asp, line 69
When I run the same query in access, it worked. There are records in the
table. But I get this error. How can I retrieve data for this?
Hope you can help me
Thanks,
Madhu
Message #2 by james.loh@a... on Fri, 18 May 2001 14:59:37
|
|
Could be your cursor location. Set the recordset's cursorlocation property
to adUseClient (or 3). What was the actual operation you were trying to
perform?
> Error Type:
> ADODB.Field (0x800A0BCD)
> Either BOF or EOF is True, or the current record has been deleted.
> Requested operation requires a current record.
> /EHDetail.asp, line 69
>
> When I run the same query in access, it worked. There are records in
the
> table. But I get this error. How can I retrieve data for this?
>
> Hope you can help me
> Thanks,
> Madhu
Message #3 by Madhu Mopuri <MMopuri@c...> on Fri, 18 May 2001 10:37:21 -0400
|
|
Hi James,
I tried to retieve data from access and passed History varaible(underlined
below, I am getting the mentioned error) and wanted to display in a table.
When the user clicks the link in other page it should take the user to
appropriate history.
EquipID=0000000008&%20history=0000000076 -----------this is the querystring
variable
set con =server.createobject("ADODB.Connection")
con.Open "CAL"
query = ("SELECT Equipment.[System ID], Equipment.[Component ID],
Equipment.Type, History.[WorkOrder Number], History.[Event Type],
History.[Event Name]FROM Equipment LEFT JOIN History ON Equipment.[Equip ID]
= History.[Equip ID]WHERE History.[Equip ID]='" & Equip & "' and
History.[History ID]= '" & History & "'")
set rs =con.Execute(query)
'Open a table here.
rs.MoveFirst
Response.Write "<Table cellpadding=0 cellspacing=0><tr>"
Response.Write "<td><Table cellpadding=0 cellspacing=0><BR>"
Response.Write "<Table cellpadding=0 cellspacing=0>"
'For iLoop = 0 to 2
Response.Write "<TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'>" & Application("uSystemID") & ": </TD></font>"
Response.write"<TD width ='20'>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(0).value & "</TD></font>"
Response.Write"</TR>"
Response.Write "<TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'>" & Application("uComID") & ": </TD></font>"
Response.write"<TD width ='20'>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(1).value & "</TD></font>"
Response.Write"</TR>"
Response.Write "<TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'>" & Application("uType") & ": </TD></font>"
Response.write"<TD width ='20'>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(2).value & "</TD></font>"
Response.Write"</TR>"
Response.write "</Table></td>"
Response.Write "<td><Table border='0' cellpadding=0
cellspacing=0><BR>"
Response.Write "<TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'>" & Application("uWONumber") & ": </font></TD>"
Response.Write "<TD width='20'> </td>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(3).value & "</font></TD>"
Response.Write "</TR>"
Response.Write "<TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'> " &Application("uEventType") & ":
</font></TD>"
Response.Write "<TD width='20'> </td>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(4).value & "</TD></font>"
Response.Write "</TR><TR>"
Response.write "<TD width='190' bgcolor ='#c0c0c0' align = 'right'
><font face='Arial' size='1'>" & Application("uEventName") & ":
</font></TD>"
Response.Write "<TD width='20'> </td>"
Response.write "<TD bgcolor ='#ffffff' align = 'left' ><font
face='Arial' size='1'><TD>" & rs.Fields(5).value & "</font></TD>"
Response.Write"</TR>"
Response.write "</Table></td>"
Response.Write "<td><Table border='0' cellpadding=0
cellspacing=0><BR>"
Response.write "</tr>"
Response.write "</Table></td>"
Response.write "</tr></Table>"
> -----Original Message-----
> From: james.loh@a... [SMTP:james.loh@a...]
> Sent: Friday, May 18, 2001 11:00 AM
> To: Access
> Subject: [access] Re: database error in asp page
>
> Could be your cursor location. Set the recordset's cursorlocation property
>
> to adUseClient (or 3). What was the actual operation you were trying to
> perform?
>
>
> > Error Type:
> > ADODB.Field (0x800A0BCD)
> > Either BOF or EOF is True, or the current record has been deleted.
> > Requested operation requires a current record.
> > /EHDetail.asp, line 69
> >
> > When I run the same query in access, it worked. There are records in
> the
> > table. But I get this error. How can I retrieve data for this?
> >
> > Hope you can help me
> > Thanks,
> > Madhu
>
Message #4 by james.loh@a... on Mon, 21 May 2001 10:48:09
|
|
Hi Madhu
Okay, assuming your capturing the variables okay and their in the format
that you want them (you can always check this by chucking them back with
response.write), and also assuming that there is no actual problem with
the query string (might also want to check this with a response.write)
then the problem would (hopefully) be with the recordset object.
If it is a problem with the recordset then you should be able to tell by
the line number of the error when you view the page (hopefully this will
point @ your movefirst command).
I can't remember, but I believe the default cast for a recordset would
involve a static cursor, which would only permit forward movement, thus
the movefirst command wouldn't work. You'll have to explicitly cast the
adodb recordset something like this:
set rs = server.createobject("ADODB.Recordset")
rs.CursorLocation = 3 'sets up a client rather than server cursor
rs.CursorType = adOpenDynamic
set rs = con.Execute(query)
Good luck
|
|
 |