ADODB.Recordset error '800a0bcd'

Results 1 to 5 of 5

Thread: ADODB.Recordset error '800a0bcd'

  1. #1
    Join Date
    Dec 2008
    Location
    Western, CO
    Posts
    50

    Default ADODB.Recordset error '800a0bcd'

    I'm trying to up date a record in the data base, i'm using a MS Access DB.

    Heres my error:
    ADODB.Recordset error '800a0bcd'

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

    D:\HOSTING\JOEGJR\PAGES\../dbincludes/cRecordSet.asp, line 440

    Heres Code for the Insert:
    Code:
    if Action="add" then
    		
    				
    
    			NRT1 = RS.ValidateVariable(trim(left(Request("NRT1"),50)), adVarChar, "yes")
    			RT1 = RS.ValidateVariable(trim(left(Request("RT1"),50)), adVarChar, "yes")
    			NRT2 = RS.ValidateVariable(trim(left(Request("NRT2"),50)), adVarChar, "yes")
    			RT2 = RS.ValidateVariable(trim(left(Request("RT2"),50)), adVarChar, "yes")
    			NRT3 = RS.ValidateVariable(trim(left(Request("NRT3"),50)), adVarChar, "yes")
    			RT3 = RS.ValidateVariable(trim(left(Request("RT3"),50)), adVarChar, "yes")
    			NRT4 = RS.ValidateVariable(trim(left(Request("NRT4"),50)), adVarChar, "yes")
    			RT4 = RS.ValidateVariable(trim(left(Request("RT4"),50)), adVarChar, "yes")
    			NRT5 = RS.ValidateVariable(trim(left(Request("NRT5"),50)), adVarChar, "yes")
    			RT5 = RS.ValidateVariable(trim(left(Request("RT5"),50)), adVarChar, "yes")
    			NRT6 = RS.ValidateVariable(trim(left(Request("NRT6"),50)), adVarChar, "yes")
    			RT6 = RS.ValidateVariable(trim(left(Request("RT6"),50)), adVarChar, "yes")
    			NRT7 = RS.ValidateVariable(trim(left(Request("NRT7"),50)), adVarChar, "yes")
    			RT7 = RS.ValidateVariable(trim(left(Request("RT7"),50)), adVarChar, "yes")
    			NRT8 = RS.ValidateVariable(trim(left(Request("NRT8"),50)), adVarChar, "yes")
    			RT8 = RS.ValidateVariable(trim(left(Request("RT8"),50)), adVarChar, "yes")
    			NRT9 = RS.ValidateVariable(trim(left(Request("NRT9"),50)), adVarChar, "yes")
    			RT9 = RS.ValidateVariable(trim(left(Request("RT9"),50)), adVarChar, "yes")
    			NRT10 = RS.ValidateVariable(trim(left(Request("NRT10"),50)), adVarChar, "yes")
    			RT10 = RS.ValidateVariable(trim(left(Request("RT10"),50)), adVarChar, "yes")
    
    
    			SQL = "Select NRT1,NRT2,NRT3,NRT4,NRT5,NRT6,NRT7,NRT8,NRT9,NRT10,RT1,RT2,RT3,RT4,RT5,RT6,RT7,RT8,RT9,RT10 from Customers where CustomerID = " & ID
    			RS.OpenRecordSet SQL, adUseServer, adOpenStatic, adLockOptimistic
    			
    			
    			
    				
    			
    			'updating database
    			RS.SetValue "NRT1", NRT1
    			RS.SetValue "RT1", RT1
    			RS.SetValue "NRT2", NRT2
    			RS.SetValue "RT2", RT2
    			RS.SetValue "NRT3", NRT3
    			RS.SetValue "RT3", RT3
    			RS.SetValue "NRT4", NRT4
    			RS.SetValue "RT4", RT4
    			RS.SetValue "NRT5", NRT5
    			RS.SetValue "RT5", RT5
    			RS.SetValue "NRT6", NRT6
    			RS.SetValue "RT6", RT6
    			RS.SetValue "NRT7", NRT7
    			RS.SetValue "RT7", RT7
    			RS.SetValue "NRT8", NRT8
    			RS.SetValue "RT8", RT8
    			RS.SetValue "NRT9", NRT9
    			RS.SetValue "RT9", RT9
    			RS.SetValue "NRT10", NRT10
    			RS.SetValue "RT10", RT10
    		
    
    			RS.Update
    			RS.CloseRecordSet
    
    			Response.Redirect "../Manage_Customers.asp?Action=rates&ID= " & ID 
    			
    			
    	end if
    Heres My code for the form:
    Code:
    <% elseif Action="nrt3" then %>
    		<form name="NRTEntry" method="post" action="<%=PageName%>">
    					<input type="hidden" name="FormText">
    					<input type="hidden" name="Company" value="<%=RS.GetValue("Company")%>">
    					<input type="hidden" name="FullName" value="<%=RS.GetValue("FullName")%>">
    					<input type="hidden" name="RT1" value="<%=RS.GetValue("RT1")%>">
    					<input type="hidden" name="RT2" value="<%=RS.GetValue("RT2")%>">
    					<input type="hidden" name="RT4" value="<%=RS.GetValue("RT4")%>">
    					<input type="hidden" name="RT5" value="<%=RS.GetValue("RT5")%>">
    					<input type="hidden" name="RT6" value="<%=RS.GetValue("RT6")%>">
    					<input type="hidden" name="RT7" value="<%=RS.GetValue("RT7")%>">
    					<input type="hidden" name="RT8" value="<%=RS.GetValue("RT8")%>">
    					<input type="hidden" name="RT9" value="<%=RS.GetValue("RT9")%>">
    					<input type="hidden" name="RT10" value="<%=RS.GetValue("RT10")%>">
    					<input type="hidden" name="NRT1" value="<%=RS.GetValue("NRT1")%>">
    					<input type="hidden" name="NRT2" value="<%=RS.GetValue("NRT2")%>">
    					<input type="hidden" name="NRT4" value="<%=RS.GetValue("NRT4")%>">
    					<input type="hidden" name="NRT5" value="<%=RS.GetValue("NRT5")%>">
    					<input type="hidden" name="NRT6" value="<%=RS.GetValue("NRT6")%>">
    					<input type="hidden" name="NRT7" value="<%=RS.GetValue("NRT7")%>">
    					<input type="hidden" name="NRT8" value="<%=RS.GetValue("NRT8")%>">
    					<input type="hidden" name="NRT9" value="<%=RS.GetValue("NRT9")%>">
    					<input type="hidden" name="NRT10" value="<%=RS.GetValue("NRT10")%>">
    		<table border="0" width="100%">
    			<tr>
    				<td><font size="2" face="arial">Customer</font></td>
    				<td><font size=1 face=arial color=#009966><%=Rs.GetValue("FullName")%> With <%=Rs.GetValue("Company")%></font></td>
    			</tr>
    			<tr>
    				<td width="50%"><font size="2" face="arial">Employee Name</font></td>
    				<td width="50%"><input type="text" value="<%=Rs.GetValue("NRT3")%>" name="NRT3"></td>
    			</tr>
    			<tr>
    				<td width="50%"><font size="2" face="arial">Employee Rate</font></td>
    				<td width="50%">$<input type="text" size="3" value="<%=Rs.GetValue("RT3")%>" name="RT3"><input type="submit" value="add" name="Action"></td>
    			</tr>
    		</table>
    		</form>	
    	<% end if %>
    Here is line 440 in my CRecrodSet.asp File:

    Code:
    if pFieldName <> "" then
    					oRS(pFieldName) = pValue
    				else
    I have tried adding a If not Rs.Eof then prior to the Rs.Set Values but this did not insert the data in to the database, but it didnt spit out an error after i did that.

    Thanks

  2. #2
    Join Date
    Dec 1969
    Posts
    95,971

    Default

    Read the error message.

    It means *EXACTLY* what it says.

    Your recordset, at the time and place in your code when that line is executed, has no records in it. Period.

    So far as I can see, NONE of the code you posted there is relevant to this problem except that little 3 line snippet at line 440. I can't see how any of the other stuff has anything to do with a recordset named oRS ... everything else is working with a differently named recordset, RS, isn't it?

  3. #3
    Join Date
    Dec 2008
    Location
    Western, CO
    Posts
    50

    Default yes

    yes, i did infact read the error message and i understand what the issue is. i just dont see why i'm having this issue, i have the exact same code with different fields in another area, and it works perfect, but on this page for what ever reason, it doesnt.

    I know the issue is saying"

    HEY IDIOT, I HAVE NO RECORD TO EDIT... OR HEY THAT DOESN'T EXIST BUD.

    About the oRS record set, i'm not sure why this is set like that the entire site uses RS, not oRS...

  4. #4
    Join Date
    Dec 2008
    Location
    Western, CO
    Posts
    50

    Default

    OK, So my issue was actually very simple...

    i was not submitting the RECORD ID with my form..

    I fixed this with...

    <input type="hidden" name="ID" value="<&#37;=RS.GetValue("CustomerID")%>">


  5. #5
    Join Date
    Dec 1969
    Posts
    95,971

    Default

    My "complaint" was more that you showed irrelevant code. The tiny fragment of relevant code was too small to make any kind of guess as to the problem.

    You have HUGE pages of complex code that uses a lot of proprietary classes/subroutines/what have you that we can't possibly know the make-up of. When you post a tiny fragment, there just nothing there for anybody to base an answer on. That's all.

Posting Permissions

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


More ASP Resources

Resources:
-- ASP Articles
-- ASP.NET Information
-- 4Guys ASP F.A.Q.
-- ASPFAQs.com
-- ASP Coding Tips
-- Related Web Technologies
-- User Tips!!
-- JavaScripts


Development Centers
-- HTML5 Development Center
-- Windows Mobile Development Center
-- Android Development Center
-- Cloud Development Project Center


Development Technology
Check out these sites for more articles, tutorials, FAQs, discussions, and code!
-- CodeGuru.com
-- VBForums.com
-- DevX.com
-- Developer.com
-- HTMLGoodies