All Forums >> [Scripting] >> ASP >> Microsoft VBScript runtime error '800a000d' Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Posts: 1
Score: 0
Joined: 9/23/2001
From: USA
Status: offline
I want to change the table information this script(below) displays from "product_category" to "state". When I substitute "state" for "product_category" I get this error message--
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'URLEncode'
/2CatList.asp, line 27
Could anyone tell me why and what I could do to fix it. Thanks, Kim
<% ' Open Database Connection Set Con = Server.CreateObject( "ADODB.Connection" ) Con.Open "storedb" %> <% Set catRS = Server.CreateObject( "ADODB.Recordset" ) catRS.ActiveConnection = Con sqlString = "SELECT DISTINCT product_category FROM Products " sqlString = sqlString & "WHERE product_status=1 " sqlString = sqlString & "ORDER BY product_category" catRS.Open sqlString %> <% If cat = "Home" THEN %> <font color="red"><b>Home</b></font> <UL> <% ELSE %> <a href="default.asp?cat=Home">Home</a> <UL> <% END IF %> <% WHILE NOT catRS.EOF %> <% IF catRS( "product_category" ) = cat THEN %> <li><font color="red"><b> <%=catRS( "product_category" )%> </b></font> <% ELSE %> <li><a href="default.asp?cat=<%=Server.URLEncode( catRS( "product_category" ) )%>"><%=catRS( "product_category" )%></a> <% END IF %> <% catRS.MoveNext WEND %> </UL> <% catRS.Close %>