Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i get this error whenever i success

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i get this error whenever i successfully login. I am able to pass variable to the 2nd ASP page. But i cannot extract the data from the database and display the data in the WELCOME Pages. And i get the following error:


ADODB.Recordset error '800a0cc1'

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

/time.asp, line 44



And my code for the 2nd ASP pages is :

<%

Dim h, name
Dim DataConn, ConnString
Dim Rs, SQL

SQL= &quot;select Name from info &quot;
Set Rs=Server.CreateObject (&quot;ADODB.Recordset&quot;)

If h < 12 then
Response.Write (&quot;<p>&quot;)
response.write(&quot;Good Morning!&quot; & Rs.Fields (&quot;NameID&quot;))(&quot;Name&quot;))
response.write(&quot;<p>You have logged in!</p>&quot;)
Response.Write (&quot;</p><p>&quot;)
elseif h <18 then
Response.Write (&quot;<p>&quot;)
response.write(&quot;Good Afternoon!,&quot; & Rs.Fields (&quot;NameID&quot;))(&quot;Name&quot;))
response.write(&quot;<p>You have logged in!</p>&quot;)
Response.Write (&quot;</p><p>&quot;)
else
Response.Write (&quot;<p>&quot;)
line 44response.write(&quot;Good Night!,&quot; & Rs.Fields (&quot;NameID&quot;))
response.write(&quot;<p>You have logged in!</p>&quot;)
Response.Write (&quot;</p><p>&quot;)

Set Rs = Nothing

End if%>


And i do not know what went wrong with the statement.


Thanks as lot....:-D
 
after (&quot;NameID&quot;)), your missing (&quot;Name&quot;))
 
on the line you've identified as line 44

after (&quot;NameID&quot;)), your missing [red](&quot;Name&quot;))[/red]
 
There is no NameID in your SQL statement:

SQL= &quot;select Name from info &quot;

So, your error is telling you that you are requesting a field that is not in your SQL statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top