Forums

ASP

This topic is locked

ADODB.Fields error '800a0cc1'

Posted 26 Apr 2002 01:11:17
1
has voted
26 Apr 2002 01:11:17 Tony Chronopoulos posted:
Hello..

I have a ilttle problem. I uploaded my site to Brinkster.com, and the connection to the database is established. When i'm in and I decide to click on a column header to sort the records, I get this error:


ADODB.Fields error '800a0cc1'

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

/bloodtrain/movie_list.asp, line 520


In case you wanna check it out for yourself, here's the link:

www10.brinkster.com/bloodtrain
username: guest
password: guest


Thanks,
Tony
ps. Tell me what you think about the site. <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

Replies

Replied 26 Apr 2002 01:31:26
26 Apr 2002 01:31:26 Andrew Watson replied:
This means that you refer to an 'item' on your page that does not exist.... Look at line 520 and youll (probably) see something like this...

<pre id=code><font face=courier size=2 id=code>
&lt;% rsSomething.Fields.Item("fieldname".Value %&gt;
</font id=code></pre id=code>

Make sure it is typed correctly and the recordset that it refers to (in the above case, 'rsSomething' ) is open. (to check this make sure that you dont see this above line 520...)

<pre id=code><font face=courier size=2 id=code>&lt;% rsSomething.close %&gt; </font id=code></pre id=code>

Cheers
Leed

:: Son, im Thirty.... ::
Replied 26 Apr 2002 01:49:35
26 Apr 2002 01:49:35 Tony Chronopoulos replied:
I'll check it right now, but do you have idea of why it would work locally and not online?


Tony




Edited by - bloodtrain on 26 Apr 2002 02:06:34
Replied 26 Apr 2002 02:12:11
26 Apr 2002 02:12:11 Tony Chronopoulos replied:
All naming is correct and the rsMovies.close() is at the end.

I'm very sure its the way I created the Sorting buttons. Can you tell me if this is "legal"?





<pre id=code><font face=courier size=2 id=code>

&lt;%
If Request.QueryString("SortWhat" = "title" AND Request.QueryString("SortHow" = "ASC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY film_title ASC;"
Else
If Request.QueryString("SortWhat" = "title" AND Request.QueryString("SortHow" = "DESC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY film_title DESC;"
Else
If Request.QueryString("SortWhat" = "actors" AND Request.QueryString("SortHow" = "ASC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY actors ASC;"
Else
If Request.QueryString("SortWhat" = "actors" AND Request.QueryString("SortHow" = "DESC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY actors DESC;"
Else
If Request.QueryString("SortWhat" = "mode" AND Request.QueryString("SortHow" = "ASC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY film_mode ASC;"
Else
If Request.QueryString("SortWhat" = "mode" AND Request.QueryString("SortHow" = "DESC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY film_mode DESC;"
Else
If Request.QueryString("SortWhat" = "avail" AND Request.QueryString("SortHow" = "ASC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY available ASC;"
Else
If Request.QueryString("SortWhat" = "avail" AND Request.QueryString("SortHow" = "DESC" Then
SQL = "SELECT * from tbl_filmInfo ORDER BY available DESC;"
Else
SQL = "SELECT * from tbl_filmInfo"
End if
End If
End IF
End If
End If
End If
End If
End IF


set rsMovies = Server.CreateObject("ADODB.Recordset"
rsMovies.ActiveConnection = MM_dsnMovies_STRING
rsMovies.Source = SQL
rsMovies.CursorType = 0
rsMovies.CursorLocation = 2
rsMovies.LockType = 3
rsMovies.Open()
rsMovies_numRows = 0
%&gt;


</font id=code></pre id=code>


every button has its specific function:


<pre id=code><font face=courier size=2 id=code>

function SortTitle() {

if (("&lt;% Response.Write(Request.QueryString("SortWhat") %&gt;" == "title" && ("&lt;% Response.Write(Request.QueryString("SortHow") %&gt;" == "ASC")
{
window.location.href = "&lt;% Response.Write(Request.ServerVariables("URL" & "?SortWhat=title&sortHow=DESC" %&gt;";
}
else
{
if (("&lt;% Response.Write(Request.QueryString("SortWhat") %&gt;" == "title" && ("&lt;% Response.Write(Request.QueryString("SortHow") %&gt;" == "DESC")
{
window.location.href = "&lt;% Response.Write(Request.ServerVariables("URL" & "?SortWhat=title&sortHow=ASC" %&gt;";
}
else
{
window.location.href = "&lt;% Response.Write(Request.ServerVariables("URL" & "?SortWhat=title&sortHow=ASC" %&gt;";
}
}

}

</font id=code></pre id=code>



To me, it looks good! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

Thanks
Tony



Edited by - bloodtrain on 26 Apr 2002 02:18:44

Edited by - bloodtrain on 26 Apr 2002 02:21:03
Replied 26 Apr 2002 14:29:00
26 Apr 2002 14:29:00 Andrew Watson replied:
Can you highlight in the code line 520 of your page movie_list.asp.

Cheers,
Leed

:: Son, im Thirty.... ::
Replied 26 Apr 2002 15:09:50
26 Apr 2002 15:09:50 Tony Chronopoulos replied:
Very strange, I got to work this morning, read your reply and then went to the site to check for the correct error line code to highlight, AND THE DAMN THING WORKS! I don't know whats going on! hehehe.. If I go back home and there's an error again, I will shoot someone! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Can you highlight in the code line 520 of your page movie_list.asp.

Cheers,
Leed

:: Son, im Thirty.... ::
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

___________________
Lunch is on me! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

Reply to this topic