|
 |
asp_databases thread: Error Type: (0x80020009) Exception occurred.
Message #1 by sein99@h... on Sun, 22 Dec 2002 06:22:00
|
|
I am building an online store. The main page (viewstore.asp) has a list
of products, and you can click a link to see more details
(viewdetails.asp). When I click on it however, I get the following error:
Error Type: (0x80020009) Exception occurred.
viewdetails.asp, line 130
The line of code it is referring to is the following:
130: strSQLC = "SELECT name, relatesTO FROM categories WHERE id="&oRs
("categoryID")
131: oRsC.Open strSQLC, oConn
Any help would be appreciated.
Message #2 by Greg Griffiths <greg2@s...> on Sun, 22 Dec 2002 14:08:05 +0000
|
|
have you checked Google
(http://www.google.com/search?sourceid=navclient&q=Error+Type%3A+%280x80020009%29+Exception+occurred)
?
At 06:22 22/12/02 +0000, you wrote:
>I am building an online store. The main page (viewstore.asp) has a list
>of products, and you can click a link to see more details
>(viewdetails.asp). When I click on it however, I get the following error:
>
>Error Type: (0x80020009) Exception occurred.
>viewdetails.asp, line 130
>
>The line of code it is referring to is the following:
>
>130: strSQLC = "SELECT name, relatesTO FROM categories WHERE id="&oRs
>("categoryID")
>
>131: oRsC.Open strSQLC, oConn
>
>Any help would be appreciated.
>
>
Message #3 by Nikos <pappas@c...> on Sun, 22 Dec 2002 20:53:19 +0200
|
|
Hi
Best wishes for Christmas to all
and
Happy New year
oRs("categoryID") does not look ok to me.
Try
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬`
= " & oRs.fields(the index of the field)
or
= " & oRs.fields!categoryID
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬`¬
Hope it will help
Regards
Nikos
At 04:08 μμ 22/12/2002, you wrote:
>&oRs
>("categoryID")
Message #4 by "John Parlato" <jparlato@m...> on Sun, 22 Dec 2002 15:55:29 -0500
|
|
130: strSQLC = "SELECT name, relatesTO FROM categories WHERE id = "
<%=oRs("categoryID")%>
Try the above.
Good luck.
John P. Parlato
-----Original Message-----
From: sein99@h... [mailto:sein99@h...]
Sent: Sunday, December 22, 2002 6:22 AM
To: ASP Databases
Subject: [asp_databases] Error Type: (0x80020009) Exception occurred.
I am building an online store. The main page (viewstore.asp) has a list
of products, and you can click a link to see more details
(viewdetails.asp). When I click on it however, I get the following error:
Error Type: (0x80020009) Exception occurred.
viewdetails.asp, line 130
The line of code it is referring to is the following:
130: strSQLC = "SELECT name, relatesTO FROM categories WHERE id="&oRs
("categoryID")
131: oRsC.Open strSQLC, oConn
Any help would be appreciated.
Message #5 by Nikos <pappas@c...> on Mon, 23 Dec 2002 03:23:07 +0200
|
|
Hi
I am very sorry for the stupid advise in a harry
in my previous email and I apologize
I will try to correct myself.
I am sending a small code that I know it is working
I guess you post your category ID from the first asp page to this one
using a link or a form field
eg
response.write("<a href=3D""thispage.asp?CategoryID=3D" &
oRsRecordsetInTheFirstPage("CategoryID") & " "" target=3D""_blank""></a>")
````````````````````````````````````````````````````````````````````````````
````````````````````
dim oConn
dim oRsC
dim categoryID
dim strSQLC
set oConn=3D Server.CreateObject("ADODB.Connection")
set oRsC=3D Server.CreateObject("ADODB.Recordset")
oConn.Open "Driver=3D{Microsoft Access Driver (*.mdb)};" & _
"Dbq=3D" & Server.Mappath("../data/MyDatabase.mdb")& ";"
categoryID=3DRequest.QueryString("categoryID") ' Or could be
request.form("categoryID") if posted from a form
strSQLC =3D "SELECT name, relatesTO FROM categories WHERE id =3D " &
categoryID
Set oRsC=3D oConn.Execute(strSQLC)
If (oRsC.BOF) AND (oRsC.EOF) then
Response.Write("Sorry anable to find item ")
else
show the product the way you want
end if
oRsC.close
set oRsC=3D Nothing
oConn.close
set oConn=3D nothing
````````````````````````````````````````````````````````````````````````````
````````````````````
I hope this will help
Mary Christmas all
Nikos
At 10:55 =EC=EC 22/12/2002, you wrote:
>130: strSQLC =3D "SELECT name, relatesTO FROM categories WHERE id =3D "
><%=3DoRs("categoryID")%>
>
>Try the above.
>
>Good luck.
>
>John P. Parlato
>
>
>
>-----Original Message-----
>From: sein99@h... [mailto:sein99@h...]
>Sent: Sunday, December 22, 2002 6:22 AM
>To: ASP Databases
>Subject: [asp_databases] Error Type: (0x80020009) Exception occurred.
>
>
>I am building an online store. The main page (viewstore.asp) has a list
>of products, and you can click a link to see more details
>(viewdetails.asp). When I click on it however, I get the following error:
>
>Error Type: (0x80020009) Exception occurred.
>viewdetails.asp, line 130
>
>The line of code it is referring to is the following:
>
>130: strSQLC =3D "SELECT name, relatesTO FROM categories WHERE id=3D"&oRs
>("categoryID")
>
>131: oRsC.Open strSQLC, oConn
>
>Any help would be appreciated.
>
>
>
>
|
|
 |