ADODB.Field error ' 800a0bcd'

Results 1 to 7 of 7

Thread: ADODB.Field error ' 800a0bcd'

  1. #1
    kiet Guest

    Default ADODB.Field error ' 800a0bcd'

    Can anybody help? Somehow it keeps giving me that rs.BOF and rs.EOF is not true, but I&#039ve tested and it&#039s true but I don&#039t know why. The following are the code and the result including the error. Thanks<BR><BR>Code:<BR><BR>&#060;% <BR> dim total, subtotal, rs, same<BR> subtotal = 0<BR> total = 0<BR> set rs = Server.CreateObject("ADODB.Recordset")<BR> <BR> sql="SELECT Companies.Name, Division.DivisionName, Sales.SaleName, Sales.PotentialSalesAmount, Sales.Probability, [Sales]![PotentialSalesAmount]*[Sales]![Probability]*0.01 AS WeightedValue, Sales.Quit, Sales.SignDoc, Employees.Manager, Employees.LastName, Employees.FirstName, Sales.DateCreated, MilestoneStep.Milestone " & _<BR> "FROM MilestoneStep INNER JOIN (Employees INNER JOIN (((Companies INNER JOIN Division ON Companies.CompanyID = Division.CompanyID) INNER JOIN (ContactPerson INNER JOIN (Calls INNER JOIN StepDetails ON Calls.CallID = StepDetails.CallID) ON ContactPerson.ContactID = Calls.ContactID) ON Division.DivisionID = ContactPerson.DivisionID) INNER JOIN Sales ON (Sales.SaleID = Calls.SaleID) AND (Division.DivisionID = Sales.DivisionID)) ON Employees.EmployeeID = Calls.EmployeeID) ON MilestoneStep.StepID = StepDetails.StepID " & _<BR> "GROUP BY Companies.Name, Division.DivisionName, Sales.SaleName, Sales.PotentialSalesAmount, Sales.Probability, Sales.Quit, Sales.SignDoc, Employees.Manager, Employees.LastName, Employees.FirstName, Sales.DateCreated, MilestoneStep.Milestone " & _<BR> "HAVING (((Sales.Quit)=No) AND ((Sales.SignDoc)=No) AND ((Employees.Manager)=" & session("EmployeeID") & ")) ORDER BY Employees.LastName;"<BR><BR><BR> rs.Open sql, db, adOpenKeySet, adLockOptimistic, adCmdText<BR> <BR> if not rs.EOF then<BR>%&#062;<BR>&#060;TABLE&#062;<BR>&#060;TR bgcolor="#FDEAAE"&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Reps&#060;/font&#062;&#060;/TH&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Company/<BR>Division&#060;/font&#062;&#060;/th&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Project&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Date<BR>Created&#060;/font&#062;&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Milestone&#060;/font&#062;&#060;TH&#062;&#060;font size=-1&#062;Potential<BR>Sales Amount&#060;/font&#062;&#060;/TH&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;percentage&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Weighted<BR> Value&#060;/font&#062;&#060;/TH&#062;<BR>&#060;/TR&#062;<BR><BR>&#060;% <BR> while not rs.EOF <BR> same = rs("LastName")<BR> <BR> do while ((same = rs("LastName")) AND (rs.eof="False")) <BR> <BR>%&#062;<BR> &#060;TR&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("LastName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Name")%&#062;&#060;/font&#062;<BR>&#060;font size="-2"&#062;&#060;%=rs("DivisionName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("SaleName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("DateCreated")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Milestone")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("PotentialSalesAmount")%&#062;&# 060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Probability")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("WeightedValue")%&#062;&#060;/font&#062;&#060;/TD&#062;&#060;/TR&#062; <BR> &#060;%subtotal = subtotal + rs("WeightedValue")%&#062;<BR> &#060;%rs.MoveNext <BR> <BR> response.write "thisis good" & rs.eof%&#062;<BR> &#060;%loop %&#062;<BR> &#060;TR&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;Subtotal:*&#060;/TD&#062;<BR> &#060;TD&#062;&#060;b&#062;&#060;font size=-1&#062;&#060;%=subtotal%&#062;&#060;/font&#062;&#060;/b&#062;&#060;/TD&#062;&#060;/TR&#062;<BR> &#060;%total = total + subtotal%&#062;<BR> &#060;%Wend%&#062;<BR> &#060;TR&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;Total:*&#060;/TD&#062;<BR> &#060;TD&#062;&#060;b&#062;&#060;font size=-1&#062;&#060;%=total%&#062;&#060;/font&#062;&#060;/b&#062;&#060;/TD&#062;&#060;/TR&#062;<BR> &#060;%rs.close%&#062;<BR> <BR>&#060;/TABLE&#062;<BR><BR>Result:<BR><BR>ADODB.Field error &#039 800a0bcd&#039 <BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR>/forecast/salespipline.asp, line 64 <BR>

  2. #2
    Tim Westmoreland Guest

    Default RE: ADODB.Field error ' 800a0bcd'

    This line is wrong:<BR><BR>do while ((same = rs("LastName")) AND (rs.eof="False")) <BR><BR>rs.eof is a logical property not a character property. It should read:<BR><BR>do while ((same = rs("LastName")) AND (rs.eof=False)) <BR><BR>

  3. #3
    Kiet Guest

    Default RE: ADODB.Field error ' 800a0bcd'

    Thanks

  4. #4
    Kiet Guest

    Default RE: ADODB.Field error ' 800a0bcd'

    Tim, <BR> I&#039ve try your recommendation, but it still giving me the same error message. You are right, there is something wrong with that loop, but I just don&#039t know what.


  5. #5
    Tim Westmoreland Guest

    Default RE: ADODB.Field error ' 800a0bcd'

    Try printing out the recordcount to see how many records are in the recordset? Also, take out the while not loop that is before the do while loop?

  6. #6
    Kiet Guest

    Default RE: ADODB.Field error ' 800a0bcd'

    Tim,<BR> It still doesn&#039t work. I have attached the code and the result, but basically what I want to do is generate a report that list the REP&#039s projects and give a subtotal for that specific Rep. Also, at the end there&#039s a total (Similar to Grand Total) that summarize all the subtotal. Ex:<BR><BR>Micheal Chicago Bull 5 Millions<BR>Micheal NIke Air 4 Millions<BR> Subtotal 9 Millions<BR>Tim Miami Heats 6 Millions<BR> Subtotal 6 Millions<BR> Total 14 Millions<BR><BR>Code:<BR><BR>&#060;% <BR> dim total, subtotal, rs, same<BR> subtotal = 0<BR> total = 0<BR> set rs = Server.CreateObject("ADODB.Recordset")<BR> <BR> sql="SELECT Companies.Name, Division.DivisionName, Sales.SaleName, Sales.PotentialSalesAmount, Sales.Probability, [Sales]![PotentialSalesAmount]*[Sales]![Probability]*0.01 AS WeightedValue, Sales.Quit, Sales.SignDoc, Employees.Manager, Employees.LastName, Employees.FirstName, Sales.DateCreated, MilestoneStep.Milestone " & _<BR> "FROM MilestoneStep INNER JOIN (Employees INNER JOIN (((Companies INNER JOIN Division ON Companies.CompanyID = Division.CompanyID) INNER JOIN (ContactPerson INNER JOIN (Calls INNER JOIN StepDetails ON Calls.CallID = StepDetails.CallID) ON ContactPerson.ContactID = Calls.ContactID) ON Division.DivisionID = ContactPerson.DivisionID) INNER JOIN Sales ON (Sales.SaleID = Calls.SaleID) AND (Division.DivisionID = Sales.DivisionID)) ON Employees.EmployeeID = Calls.EmployeeID) ON MilestoneStep.StepID = StepDetails.StepID " & _<BR> "GROUP BY Companies.Name, Division.DivisionName, Sales.SaleName, Sales.PotentialSalesAmount, Sales.Probability, Sales.Quit, Sales.SignDoc, Employees.Manager, Employees.LastName, Employees.FirstName, Sales.DateCreated, MilestoneStep.Milestone " & _<BR> "HAVING (((Sales.Quit)=No) AND ((Sales.SignDoc)=No) AND ((Employees.Manager)=" & session("EmployeeID") & ")) ORDER BY Employees.LastName;"<BR><BR><BR> rs.Open sql, db, adOpenKeySet, adLockOptimistic, adCmdText<BR> <BR> if not rs.EOF then<BR>%&#062;<BR>&#060;TABLE&#062;<BR>&#060;TR bgcolor="#FDEAAE"&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Reps&#060;/font&#062;&#060;/TH&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Company/<BR>Division&#060;/font&#062;&#060;/th&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;Project&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Date<BR>Created&#060;/font&#062;&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Milestone&#060;/font&#062;&#060;TH&#062;&#060;font size=-1&#062;Potential<BR>Sales Amount&#060;/font&#062;&#060;/TH&#062;<BR> &#060;TH&#062;&#060;font size=-1&#062;percentage&#060;/TH&#062;&#060;TH&#062;&#060;font size=-1&#062;Weighted<BR> Value&#060;/font&#062;&#060;/TH&#062;<BR>&#060;/TR&#062;<BR><BR>&#060;% <BR> while not rs.EOF <BR> same = rs("LastName") <BR>%&#062;<BR> &#060;TR&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("LastName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Name")%&#062;&#060;/font&#062;<BR>&#060;font size="-2"&#062;&#060;%=rs("DivisionName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("SaleName")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("DateCreated")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Milestone")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("PotentialSalesAmount")%&#062;&# 060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("Probability")%&#062;&#060;/font&#062;&#060;/TD&#062;<BR> &#060;TD&#062;&#060;font size=-1&#062;&#060;%=rs("WeightedValue")%&#062;&#060;/font&#062;&#060;/TD&#062;&#060;/TR&#062; <BR> &#060;%subtotal = subtotal + rs("WeightedValue")%&#062;<BR> &#060;%rs.MoveNext%&#062; <BR> &#060;%if (same &#060;&#062; rs("LastName") or same="") then%&#062;<BR> &#060;TR&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;Subtotal:*&#060;/TD&#062;<BR> &#060;TD&#062;&#060;b&#062;&#060;font size=-1&#062;&#060;%=subtotal%&#062;&#060;/font&#062;&#060;/b&#062;&#060;/TD&#062;&#060;/TR&#062;<BR> &#060;%total = total + subtotal%&#062;<BR> &#060;%end if%&#062;<BR> &#060;%Wend%&#062;<BR> &#060;TR&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;&#060;/TD&#062;&#060;TD&#062;Total:*&#060;/TD&#062;<BR> &#060;TD&#062;&#060;b&#062;&#060;font size=-1&#062;&#060;%=total%&#062;&#060;/font&#062;&#060;/b&#062;&#060;/TD&#062;&#060;/TR&#062;<BR> &#060;%rs.close%&#062;<BR> <BR>&#060;/TABLE&#062;<BR><BR><BR>&#060;%End If %&#062;<BR><BR>RESULT:<BR><BR>ADODB.Field error &#039 800a0bcd&#039 <BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR>/forecast/salespipline.asp, line 75 <BR>

  7. #7
    Join Date
    Dec 1969
    Posts
    131

    Default RE: ADODB.Field error ' 800a0bcd'

    Hi,<BR><BR>I am still learning ASP, however I remember encountering an error such as the one in which you are getting. In your SQL where exists.......... ((Employees.Manager)=" & session("EmployeeID") & ")), is EmployeeID a variable which is being passed from a previous page? I am NOT used to session so, this is just a hunch. If you are indeed passing EmployeeID from a previous page, you should declare it before you try to use it, for eg. EmployeeID=Request.Querystring("Employee_ID"). Good luck anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •