Advertisement

06.10.2008 at 03:23PM PDT, ID: 23474091 | Points: 500
[x]
Attachment Details

ADODB.Recordset error '800a0cc1'

Asked by awinstead in Active Server Pages (ASP)

Hello Everyone,
I am getting a strange error from a ASP page I am working on.
ADODB.Fields error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/includes/Profile/subs/repair_tix.asp, line 139

Now I know this error message usually comes from a query trying to reference a record that doesn't exist.  The wierd part is  the SQL query is:
<%
Dim Profile_Emp_Off_Rep, Off_Rep_SQL
Profile_Emp_Off_Rep = (Profile_Off_Repair_Tix_Emp.Fields.Item("SREP_CODE").Value)
Off_Rep_SQL = "SELECT * FROM Kiosk_Tasks WHERE REP_ID = '" & Profile_Emp_Off_Rep & "' ORDER BY RepairID DESC"

Response.Write(Off_Rep_SQL)
%>


THE Page writes out:
SELECT * FROM Kiosk_Tasks WHERE REP_ID = 'M3M' ORDER BY RepairID DESC

then runs the following:

<%
Dim Profile_Off_repair_Tasks
Dim Profile_Off_repair_Tasks_cmd
Dim Profile_Off_repair_Tasks_numRows

Set Profile_Off_repair_Tasks_cmd = Server.CreateObject ("ADODB.Command")
Profile_Off_repair_Tasks_cmd.ActiveConnection = MM_SmartMain_V3_STRING
Profile_Off_repair_Tasks_cmd.CommandText = Off_Sup_SQL
Profile_Off_repair_Tasks_cmd.Prepared = true
Profile_Off_repair_Tasks_cmd.Parameters.Append Profile_Off_repair_Tasks_cmd.CreateParameter("param1", 200, 1, 50, Profile_Off_repair_Tasks__MMColParam) ' adVarChar

Set Profile_Off_repair_Tasks = Profile_Off_repair_Tasks_cmd.Execute
Profile_Off_repair_Tasks_numRows = 0
%>
And the SQL statement doesn't error out.


Now the strange thing is, if I do:
<%=(Profile_Off_repair_Tasks.Fields.Item("RepairID").Value)%>
It will error but if I do:
<%=(Profile_Off_repair_Tasks.Fields.Item("Details").Value)%>
it works fine. Details is just another record in the same table. Also if I go to SQL view in the database and cut and paste the above select statement that I wrote out above it works fine and I see the records? Am I dealing with reserved words or something here? Any help would be greatly appreciated.
Start Free Trial
[+][-]06.10.2008 at 09:20PM PDT, ID: 21756746

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 09:43AM PDT, ID: 21761833

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 07:24PM PDT, ID: 21765794

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628