Can someone out there help me?
I am getting a "80020009 exception occurred" error.
A friend of mine developed the code below and he used it on a website and
it worked fine. I copied the code exactly and I'm getting the error
mentioned.
If anyone has any ideas, I would apprecite it.
Gary
I am rather new to ASP so bear with me.
The error message is occurring at the Response.Write line below the dashed
line --------- that I put in below:
CATEGORY_TABLE = "Business_category"
'Name of categories table
MEMBER_TABLE = "Businesslistings"
'Name of members table
DISPLAY_WIDTH = 450
'Width of members display table
sParent = Trim(Request("Parent"))
If sParent = "" Then sParent = Null
'// Open Recordset
sqlCats = "SELECT * FROM " & CATEGORY_TABLE & " WHERE Parent_ID = '" &
sParent & "' ORDER BY Category_Name"
Set rsCats = Server.CreateObject("ADODB.RecordSet")
rsCats.Open sqlCats, UPLOAD_DSN
'// Display Sub Categories
If Not rsCats.EOF Then
'Loop through categories
While Not rsCats.EOF
'Link
Response.Write("<p><a href='members.asp?Parent=" & rsCats
("Category_ID") & "'>")
'Category
Response.Write("<font size=3><b>" & rsCats
("Category_Name") & "</b></font>")
'End Link
Response.Write("</a>")
'Next category
rsCats.MoveNext
Wend
'// Display Members
Else
'Open recordset
sqlMembers = "SELECT * FROM " & MEMBER_TABLE & " WHERE Category
LIKE '%" & sParent & "%' ORDER BY Business"
Set rsMembers = Server.CreateObject("ADODB.RecordSet")
rsMembers.Open sqlMembers, UPLOAD_DSN
--------------------------------------------------------------------------
'Category Trail
sqlTrail = "SELECT Category_Name FROM " & CATEGORY_TABLE & " WHERE
Category_ID = '" & sParent & "' "
Set rsTrail = Server.CreateObject("ADODB.RecordSet")
rsTrail.Open sqlTrail, UPLOAD_DSN
Response.Write("<p> <font size=3><b>" & rsTrail
("Category_Name") & "</b></font>")
rsTrail.Close
Set rsTrail = Nothing