Home > ASP Development > ADODB.Field error '800a0bcd'

ADODB.Field error '800a0bcd'



I am having problem with a search page cutting across multiple result pages.The form has two form fields,a listbox and a textfield.The method of the form is set to GET and the action was set to "no page" since it is supposed to take user to a result page based on the option selected on the listbox and the value of the textfield is used in searching the database.



The action on the form is:

Reqtype - name of listbox


Code:


<%If (CStr(Request("submit")) <> "") Then%>
<% If (Request.QueryString("Reqtype") = "Daily Requisition") Then
Response.Redirect("res1.asp")
Else
If (Request.QueryString("Reqtype") = "Market Requisition")
Then
Response.Redirect("res2.asp")
Else
Response.Redirect("error.asp")
End If%>
<% End If %>






When this is done,it returns this error on the result page

Quote:
ADODB.Field error '800a0bcd'



Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.




This is a typical recordset of the result page:

ReqOrder = name of textfield on the search page


Code:


<%
Dim Reqr__MMColParam
Reqr__MMColParam = "1"
If (Request.QueryString("ReqOrder")<> "") Then
Reqr__MMColParam = Request.QueryString("ReqOrder")
End If
%>
<%
Dim Reqr
Dim Reqr_numRows

Set Reqr = Server.CreateObject("ADODB.Recordset")
Reqr.ActiveConnection = MM_LBSINTRANET_STRING
Reqr.Source = "SELECT a.ReqID, a.ProductID, a.ProductName, a.ProductQty, a.ProductUnitM, b.ReqOrderID, b.ReqOfficer, b.ReqDate2,b. ReqDept,b.ReqItems FROM dbo.ChemicalReqA AS a, dbo.ChemicalReqB AS b WHERE b.ReqOrderID = " + Replace(Reqr__MMColParam, "'", "''") + " and b.ReqOrderID = a.ReqOrderID"
Reqr.CursorType = 0
Reqr.CursorLocation = 2
Reqr.LockType = 1
Reqr.Open()

Reqr_numRows = 0
%>






I need a help on this.What am I doing wrong?

    
Guest


Usually the error means your sql returned no records.



Identify the line of code causing the error message.

Was this answer helpful ? Yes No   
Guest


My database contains the records needed but the issue is how the parameter is passed to the results page.Maybe there is something wrong with the form parameter passed.

Can someone still help?

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by tbaruwa
My database contains the records needed but the issue is how the parameter is passed to the results page.Maybe there is something wrong with the form parameter passed.




The suggestion was not that your DB did not contain records it was that you may not be finding the correct records because of an error with your SQL.



Have you used Response.Write to check that the data that is being passed is correct?



Also Response.Write your sql string to make sure that it is properly formed.



Sometimes using Trim can help to remove excess zeroes from your search criteria!!



Trim(Reqr__MMColParam)

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved