Link to home
Create AccountLog in
Avatar of Allen Baragar
Allen Baragar

asked on

ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal.

I receive the following error when I submit my form:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/IoeS/IOES1.asp, line 5502
<%
end sub

Private sub POSTMETHOD2
'*****************************************************************************
'WRITE DATA TO DATABASE
'*****************************************************************************
    Dim rst : Set rst = Server.CreateObject("ADODB.Recordset")
    Dim sSQLRequest : sSQLRequest = "SELECT * FROM tblAssessments ORDER BY fldAssessID;"
    rst.Open sSQLRequest, conn, 2, 3
    rst.AddNew
    
    	rst.Fields("fldDate") = Request.Form("txtDate")
        rst.Fields("fldName") = Request.Form("Name")
        rst.Fields("fldEmpID") = Request.Form("txtEmpID")
        rst.Fields("fldAssessorName") = Request.Form("txtAName")
        rst.Fields("fldAssessorID") = Request.Form("txtAEmpID")
        rst.Fields("fldEnteredBy") = Request.Form("txtEnteredbyName")
        rst.Fields("fldEnteredByID") = Request.Form("txtEnteredbyID")
        rst.Fields("fldCompany") = Request.Form("optCompany")
        rst.Fields("fldFacility") = Request.Form("cboFacility")
        rst.Fields("fldAssessAttempt") = Request.Form("cboAssessAttempt")
        rst.Fields("fldAssessResult") = Request.Form("cboAssessResult")
        rst.Fields("fldSection1a") = Request.Form("cboPassFail1a")
        rst.Fields("fldSection1b") = Request.Form("cboPassFail1b")
        rst.Fields("fldSection1c") = Request.Form("cboPassFail1c")
		rst.Fields("fldSection2a") = Request.Form("cboPassFail2a")
		rst.Fields("fldSection2b") = Request.Form("cboPassFail2b")
		rst.Fields("fldSection2c") = Request.Form("cboPassFail2c")
		rst.Fields("fldSection2d") = Request.Form("cboPassFail2d")
		rst.Fields("fldSection2e") = Request.Form("cboPassFail2e")
		rst.Fields("fldSection2f") = Request.Form("cboPassFail2f")
		rst.Fields("fldSection2g") = Request.Form("cboPassFail2g")
		rst.Fields("fldSection2h") = Request.Form("cboPassFail2h")
		rst.Fields("fldSection2i") = Request.Form("cboPassFail2i")
		rst.Fields("fldSection2j") = Request.Form("cboPassFail2j")
		rst.Fields("fldSection2k") = Request.Form("cboPassFail2k")
		rst.Fields("fldSection2l") = Request.Form("cboPassFail2l")
		rst.Fields("fldSection2m") = Request.Form("cboPassFail2m")
		rst.Fields("fldSection2n") = Request.Form("cboPassFail2n")
		rst.Fields("fldSection3a") = Request.Form("cboPassFail3a")
		rst.Fields("fldSection3b") = Request.Form("cboPassFail3b")
		rst.Fields("fldSection3c") = Request.Form("cboPassFail3c")
		rst.Fields("fldSection3d") = Request.Form("cboPassFail3d")
		rst.Fields("fldSection3e") = Request.Form("cboPassFail3e")
		rst.Fields("fldSection3f") = Request.Form("cboPassFail3f")
		rst.Fields("fldSection3g") = Request.Form("cboPassFail3g")
		rst.Fields("fldSection3h") = Request.Form("cboPassFail3h")
		rst.Fields("fldSection3i") = Request.Form("cboPassFail3i")
		rst.Fields("fldSection3j") = Request.Form("cboPassFail3j")
		rst.Fields("fldSection3k") = Request.Form("cboPassFail3k")
		rst.Fields("fldSection3l") = Request.Form("cboPassFail3l")
		rst.Fields("fldSection3m") = Request.Form("cboPassFail3m")
		rst.Fields("fldSection3n") = Request.Form("cboPassFail3n")
		rst.Fields("fldSection3o") = Request.Form("cboPassFail3o")
		rst.Fields("fldSection3p") = Request.Form("cboPassFail3p")
		rst.Fields("fldSection3q") = Request.Form("cboPassFail3q")
		rst.Fields("fldSection3r") = Request.Form("cboPassFail3r")
		rst.Fields("fldSection3s") = Request.Form("cboPassFail3s")
		rst.Fields("fldSection3t") = Request.Form("cboPassFail3t")
		rst.Fields("fldSection4a") = Request.Form("cboPassFail4a")
		rst.Fields("fldSection4b") = Request.Form("cboPassFail4b")
		rst.Fields("fldSection4c1") = Request.Form("cboPassFail4c1")
		rst.Fields("fldSection4c2") = Request.Form("cboPassFail4c2")
		rst.Fields("fldSection4c3") = Request.Form("cboPassFail4c3")
		rst.Fields("fldSection4c4") = Request.Form("cboPassFail4c4")
		rst.Fields("fldSection4c5") = Request.Form("cboPassFail4c5")
		rst.Fields("fldSection4d") = Request.Form("cboPassFail4d")
		rst.Fields("fldSection4e") = Request.Form("cboPassFail4e")
		rst.Fields("fldSection4f") = Request.Form("cboPassFail4f")
		rst.Fields("fldSection4g") = Request.Form("cboPassFail4g")
		rst.Fields("fldSection4h") = Request.Form("cboPassFail4h")
		rst.Fields("fldSection4i") = Request.Form("cboPassFail4i")
		rst.Fields("fldSection4j") = Request.Form("cboPassFail4j")
		rst.Fields("fldSection4k") = Request.Form("cboPassFail4k")
		'DOCUMENTATION RESPONSES
		'SECTION 2
		rst.Fields("fldStage12") = Request.Form("cboPassFail12")
		rst.Fields("fldStage22") = Request.Form("cboPassFail22")
		rst.Fields("fldStage32") = Request.Form("cboPassFail32")
		rst.Fields("fldStage42") = Request.Form("cboPassFail42")
		rst.Fields("fldStage52") = Request.Form("cboPassFail52")
		rst.Fields("fldStage62") = Request.Form("cboPassFail62")
		rst.Fields("fldStage72") = Request.Form("cboPassFail72")
		rst.Fields("fldStage82") = Request.Form("cboPassFail82")
		rst.Fields("fldStage92") = Request.Form("cboPassFail92")
		rst.Fields("fldStage102") = Request.Form("cboPassFail02")
		rst.Fields("fldStage142") = Request.Form("cboPassFail42")
		rst.Fields("fldStage152") = Request.Form("cboPassFail52")
		rst.Fields("fldStage162") = Request.Form("cboPassFail62")
		rst.Fields("fldStage172") = Request.Form("cboPassFaill72")
		rst.Fields("fldStage192") = Request.Form("cboPassFaill92")
		rst.Fields("fldStage202") = Request.Form("cboPassFail202")
		rst.Fields("fldStage212") = Request.Form("cboPassFail212")
		rst.Fields("fldStage222") = Request.Form("cboPassFail222")
		rst.Fields("fldStage232") = Request.Form("cboPassFail232")
		rst.Fields("fldStage242") = Request.Form("cboPassFail242")
		rst.Fields("fldStage252") = Request.Form("cboPassFail252")
		rst.Fields("fldStage262") = Request.Form("cboPassFail262")
		rst.Fields("fldStage272") = Request.Form("cboPassFail272")
		rst.Fields("fldStage282") = Request.Form("cboPassFail282")
		rst.Fields("fldStage292") = Request.Form("cboPassFail292")
		rst.Fields("fldStage302") = Request.Form("cboPassFail302")
		'SECTION 3
		rst.Fields("fldStage313") = Request.Form("cboPassFail313")
		rst.Fields("fldStage323") = Request.Form("cboPassFail323")
		rst.Fields("fldStage333") = Request.Form("cboPassFail333")
		rst.Fields("fldStage343") = Request.Form("cboPassFail343")
		rst.Fields("fldStage353") = Request.Form("cboPassFail353")
		rst.Fields("fldStage363") = Request.Form("cboPassFail363")
		rst.Fields("fldStage373") = Request.Form("cboPassFail373")
		rst.Fields("fldStage383") = Request.Form("cboPassFail383")
		rst.Fields("fldStage393") = Request.Form("cboPassFail393")
		rst.Fields("fldStage403") = Request.Form("cboPassFail403")
		rst.Fields("fldStage413") = Request.Form("cboPassFail413")
		rst.Fields("fldStage423") = Request.Form("cboPassFail423")
		rst.Fields("fldStage433") = Request.Form("cboPassFail433")
		rst.Fields("fldStage443") = Request.Form("cboPassFail443")
		rst.Fields("fldStage453") = Request.Form("cboPassFail453")
		rst.Fields("fldStage463") = Request.Form("cboPassFail463")
		rst.Fields("fldStage473") = Request.Form("cboPassFail473")
		rst.Fields("fldStage483") = Request.Form("cboPassFail483")
		rst.Fields("fldStage493") = Request.Form("cboPassFail493")
		rst.Fields("fldStage503") = Request.Form("cboPassFail503")
		rst.Fields("fldStage513") = Request.Form("cboPassFail513")
		rst.Fields("fldStage523") = Request.Form("cboPassFail523")
		rst.Fields("fldStage533") = Request.Form("cboPassFail533")
		rst.Fields("fldStage543") = Request.Form("cboPassFail543")
		rst.Fields("fldStage553") = Request.Form("cboPassFail553")
		rst.Fields("fldStage563") = Request.Form("cboPassFail563")
		rst.Fields("fldStage573") = Request.Form("cboPassFail573")
		rst.Fields("fldStage583") = Request.Form("cboPassFail583")
		rst.Fields("fldStage893") = Request.Form("cboPassFail593")
		rst.Fields("fldStage603") = Request.Form("cboPassFail603")
		rst.Fields("fldStage613") = Request.Form("cboPassFail613")
		rst.Fields("fldStage623") = Request.Form("cboPassFail623")
		rst.Fields("fldStage633") = Request.Form("cboPassFail633")
		rst.Fields("fldStage643") = Request.Form("cboPassFail643")
		rst.Fields("fldStage653") = Request.Form("cboPassFail653")
		rst.Fields("fldStage663") = Request.Form("cboPassFail663")
		rst.Fields("fldStage673") = Request.Form("cboPassFail673")
		rst.Fields("fldStage683") = Request.Form("cboPassFail683")
		rst.Fields("fldStage693") = Request.Form("cboPassFail693")
		rst.Fields("fldStage703") = Request.Form("cboPassFail703")
		rst.Fields("fldStage713") = Request.Form("cboPassFail713")
		rst.Fields("fldStage723") = Request.Form("cboPassFail723")
		rst.Fields("fldStage733") = Request.Form("cboPassFail733")
		rst.Fields("fldStage743") = Request.Form("cboPassFail743")
		rst.Fields("fldStage753") = Request.Form("cboPassFail753")
		rst.Fields("fldStage763") = Request.Form("cboPassFail763")
		rst.Fields("fldStage773") = Request.Form("cboPassFail773")
		rst.Fields("fldStage783") = Request.Form("cboPassFail783")
		rst.Fields("fldStage793") = Request.Form("cboPassFail793")
		rst.Fields("fldStage803") = Request.Form("cboPassFail803")
		rst.Fields("fldStage813") = Request.Form("cboPassFail813")
		rst.Fields("fldStage823") = Request.Form("cboPassFail823")
		rst.Fields("fldStage833") = Request.Form("cboPassFail833")
		rst.Fields("fldStage843") = Request.Form("cboPassFail843")
		rst.Fields("fldStage853") = Request.Form("cboPassFail853")
		rst.Fields("fldStage863") = Request.Form("cboPassFail863")
		rst.Fields("fldStage873") = Request.Form("cboPassFail873")
		rst.Fields("fldStage883") = Request.Form("cboPassFail883")
		rst.Fields("fldStage893") = Request.Form("cboPassFail893")
		rst.Fields("fldStage903") = Request.Form("cboPassFail903")
		'SECTION 4
		rst.Fields("fldStage904") = Request.Form("cboPassFail904")
		rst.Fields("fldStage914") = Request.Form("cboPassFail914")
		rst.Fields("fldStage924") = Request.Form("cboPassFail924")
		rst.Fields("fldStage934") = Request.Form("cboPassFail934")
		rst.Fields("fldStage944") = Request.Form("cboPassFail944")
		rst.Fields("fldStage954") = Request.Form("cboPassFail954")
		rst.Fields("fldStage964") = Request.Form("cboPassFail964")
		rst.Fields("fldStage974") = Request.Form("cboPassFail974")
		'DEMONSTRATED RESPONSES
		rst.Fields("fldDemo1a") = Request.Form("cboDemo1a")
		rst.Fields("fldDemo1b") = Request.Form("cboDemo1b")
		rst.Fields("fldDemo1c") = Request.Form("cboDemo1c")
		rst.Fields("fldDemo2a") = Request.Form("cboDemo2a")
		rst.Fields("fldDemo2b") = Request.Form("cboDemo2b")
		rst.Fields("fldDemo2c") = Request.Form("cboDemo2c")
		rst.Fields("fldDemo2d") = Request.Form("cboDemo2d")
		rst.Fields("fldDemo2e") = Request.Form("cboDemo2e")
		rst.Fields("fldDemo2f") = Request.Form("cboDemo2f")
		rst.Fields("fldDemo2g") = Request.Form("cboDemo2g")
		rst.Fields("fldDemo2h") = Request.Form("cboDemo2h")
		rst.Fields("fldDemo2i") = Request.Form("cboDemo2i")
		rst.Fields("fldDemo2j") = Request.Form("cboDemo2j")
		rst.Fields("fldDemo2k") = Request.Form("cboDemo2k")
		rst.Fields("fldDemo2l") = Request.Form("cboDemo2l")
		rst.Fields("fldDemo2m") = Request.Form("cboDemo2m")
		rst.Fields("fldDemo2n") = Request.Form("cboDemo2n")
		rst.Fields("fldDemo3a") = Request.Form("cboDemo3a")
		rst.Fields("fldDemo3b") = Request.Form("cboDemo3b") 'Line 5502
		rst.Fields("fldDemo3c") = Request.Form("cboDemo3c")
		rst.Fields("fldDemo3d") = Request.Form("cboDemo3d")
		rst.Fields("fldDemo3e") = Request.Form("cboDemo3e")
		rst.Fields("fldDemo3f") = Request.Form("cboDemo3f")
		rst.Fields("fldDemo3g") = Request.Form("cboDemo3g")
		rst.Fields("fldDemo3h") = Request.Form("cboDemo3h")
		rst.Fields("fldDemo3i") = Request.Form("cboDemo3i")
		rst.Fields("fldDemo3j") = Request.Form("cboDemo3j")
		rst.Fields("fldDemo3k") = Request.Form("cboDemo3k")
		rst.Fields("fldDemo3l") = Request.Form("cboDemo3l")
		rst.Fields("fldDemo3m") = Request.Form("cboDemo3m")
		rst.Fields("fldDemo3n") = Request.Form("cboDemo3n")			
		rst.Fields("fldDemo3o") = Request.Form("cboDemo3o")
		rst.Fields("fldDemo3p") = Request.Form("cboDemo3p")
		rst.Fields("fldDemo3q") = Request.Form("cboDemo3q")
		rst.Fields("fldDemo3r") = Request.Form("cboDemo3r")
		rst.Fields("fldDemo3s") = Request.Form("cboDemo3s")
		rst.Fields("fldDemo3t") = Request.Form("cboDemo3t")						
		rst.Fields("fldDemo4a") = Request.Form("cboDemo4a")
		rst.Fields("fldDemo4b") = Request.Form("cboDemo4b")
		rst.Fields("fldDemo4c1") = Request.Form("cboDemo4c1")
		rst.Fields("fldDemo4c2") = Request.Form("cboDemo4c2")
		rst.Fields("fldDemo4c3") = Request.Form("cboDemo4c3")
		rst.Fields("fldDemo4c4") = Request.Form("cboDemo4c4")
		rst.Fields("fldDemo4c5") = Request.Form("cboDemo4c5")								
		rst.Fields("fldDemo4d") = Request.Form("cboDemo4d")
		rst.Fields("fldDemo4e") = Request.Form("cboDemo4e")
		rst.Fields("fldDemo4f") = Request.Form("cboDemo4f")
		rst.Fields("fldDemo4g") = Request.Form("cboDemo4g")
		rst.Fields("fldDemo4h") = Request.Form("cboDemo4h")
		rst.Fields("fldDemo4i") = Request.Form("cboDemo4i")
		rst.Fields("fldDemo4j") = Request.Form("cboDemo4j")
		rst.Fields("fldDemo4k") = Request.Form("cboDemo4k")														
		'COMMENTS (REQUIRED ONLY IF ANY STEP HAS FAIL SELECTED)
		If Request.Form("txtComments") <> "" Then
			rst.Fields("fldComments") = Request.Form("txtComments")
		End if		

    rst.Update
    rst.Close : Set rst = Nothing
	conn.Close : Set conn = Nothing
%>

Open in new window


I have removed the that line of code and continue to receive the error message. I have double checked my column names and they match. If I remove all the lines of code after that line, I still receive that error message pointing to Line 5502 even though that line has the following in it </td>

I am at a loss here. All of my research points to either a bad column name or the use of an ambiguous name. I am not sure what to do to fix this problem.

Regards,

Allen
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Allen Baragar
Allen Baragar

ASKER

Here is line 5502

   rst.Fields("fldDemo3b") = Request.Form("cboDemo3b") 'Line 5502

Here is the column header from my access db

fldDemo3d

If I remove that line from the code, it still fails on that line.
ok what about the line right above it? does that look ok? if you comment that line out, will it work?
Same result. Same line. I have even removed the whole section of code starting at 'Demonstrated Responses and continue to get the same error referring to the same line, Line 5502 even though it is outside the connection code and in the html code at that point.
By the way, in my initial response, there was a typo.

Here is the column header from my access db

fldDemo3d

Should have read:

Here is the column header from my access db

fldDemo3b
have you tried taking out every line except that one? if that works, you can add each line back, one by one, until you find the issue.

i know it's tedious, but I'm not sure what the issue is and am just thinking of ways to troubleshoot :)
It is buried in one of my many lines of adding to the database. I just removed another section of the code and the post worked fine. Time to go section by section, line by line.

Thanks for the help.
ya i kind of figured after a few back and forths here, the error line numbers don't always match up...

good luck!
I found it. The error message was off by about 30 lines of code. Thanks again for the help.
OP confirmed this was the issue