|
 |
asp_databases thread: RE: Item cannot be found in the collection
Message #1 by "danny njuguna" <danny@n...> on Fri, 5 Apr 2002 07:12:31
|
|
The catcode is selected on line 15 it is on the table product.The link is
now working so u can try it.
> you need to select the catcode in the select part to use it in the where
part of the sql string
-----Original Message-----
From: danny njuguna [mailto:danny@n...]
Sent: Thursday, April 04, 2002 4:02 PM
To: ASP Databases
Subject: [asp_databases] Item cannot be found in the collection
I get the following error when i access the product.asp page. This is when
i select
a particular item in the database from
http://www.gekflies.com/htdocs/cart/category.asp?catcode=1 on the menu on
the left.
***************************error******************************************
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
/htdocs/cart/product.asp, line 27
****************************end error*************************************
**************************product.asp**************************************
1.<%@ LANGUAGE = "VBScript" %>
2.<!-- #include file="db.asp" -->
3.<!-- #include file="config.asp" -->
4.<!-- #include file="functions.asp" -->
5.<!-- #include file="wishlist.asp" -->
6.
7.<%
8.productid=valid_sql(request.querystring("productid")
9.
10.if productid=null or productid="" or not(isnumeric(productid)) then
11. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
12.end if
13.
14.'get the relevant products details
15.set rsprod=db.execute("SELECT * FROM products INNER JOIN categories ON
16.products.catcode = categories.catcode WHERE productid = " & productid)
17.
18.if rsprod.eof then
19. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
20.end if
21.
22.if request.querystring("wish")="add" then
23. WISHLIST_add(productid)
24.end if
25.
26.'get names and codes of all products in that category
27.set rscatlist=db.execute("select name,productid from products where
28.catcode=" & rsprod("catcode") & " order by name")
29.%>
**************************************************************************
Message #2 by imran.saleem@b... on Thu, 4 Apr 2002 15:02:25 +0100
|
|
you need to select the catcode in the select part to use it in the where
part of the sql string
-----Original Message-----
From: danny njuguna [mailto:danny@n...]
Sent: Thursday, April 04, 2002 4:02 PM
To: ASP Databases
Subject: [asp_databases] Item cannot be found in the collection
I get the following error when i access the product.asp page. This is when
i select
a particular item in the database from
http://www.gekflies.com/htdocs/cart/category.asp?catcode=1 on the menu on
the left.
***************************error******************************************
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
/htdocs/cart/product.asp, line 27
****************************end error*************************************
**************************product.asp**************************************
1.<%@ LANGUAGE = "VBScript" %>
2.<!-- #include file="db.asp" -->
3.<!-- #include file="config.asp" -->
4.<!-- #include file="functions.asp" -->
5.<!-- #include file="wishlist.asp" -->
6.
7.<%
8.productid=valid_sql(request.querystring("productid")
9.
10.if productid=null or productid="" or not(isnumeric(productid)) then
11. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
12.end if
13.
14.'get the relevant products details
15.set rsprod=db.execute("SELECT * FROM products INNER JOIN categories ON
16.products.catcode = categories.catcode WHERE productid = " & productid)
17.
18.if rsprod.eof then
19. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
20.end if
21.
22.if request.querystring("wish")="add" then
23. WISHLIST_add(productid)
24.end if
25.
26.'get names and codes of all products in that category
27.set rscatlist=db.execute("select name,productid from products where
28.catcode=" & rsprod("catcode") & " order by name")
29.%>
**************************************************************************
Message #3 by "danny njuguna" <danny@n...> on Thu, 4 Apr 2002 15:01:50
|
|
I get the following error when i access the product.asp page. This is when
i select
a particular item in the database from
http://www.gekflies.com/htdocs/cart/category.asp?catcode=1 on the menu on
the left.
***************************error******************************************
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
/htdocs/cart/product.asp, line 27
****************************end error*************************************
**************************product.asp**************************************
1.<%@ LANGUAGE = "VBScript" %>
2.<!-- #include file="db.asp" -->
3.<!-- #include file="config.asp" -->
4.<!-- #include file="functions.asp" -->
5.<!-- #include file="wishlist.asp" -->
6.
7.<%
8.productid=valid_sql(request.querystring("productid")
9.
10.if productid=null or productid="" or not(isnumeric(productid)) then
11. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
12.end if
13.
14.'get the relevant products details
15.set rsprod=db.execute("SELECT * FROM products INNER JOIN categories ON
16.products.catcode = categories.catcode WHERE productid = " & productid)
17.
18.if rsprod.eof then
19. response.redirect("error.asp?msg=" & Server.URLEncode("We have no
record of the product you are looking for."))
20.end if
21.
22.if request.querystring("wish")="add" then
23. WISHLIST_add(productid)
24.end if
25.
26.'get names and codes of all products in that category
27.set rscatlist=db.execute("select name,productid from products where
28.catcode=" & rsprod("catcode") & " order by name")
29.%>
**************************************************************************
|
|
 |