请教高手
我在调试网站时,点击下页的时候出现错误,提示:Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: 'clng'
/product.asp,行 73
不知道是什么原因,请高手指点一下.网站原码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>产品展示</title>
<link href="style/rgwj.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript">
function changpage()
{
fo = document.form1;
Page = fo.PageIndex.value;
Mtype = fo.productClassID.value;
fo.action = "product.asp?productClassID="+Mtype+"&PageIndex="+Page;
fo.submit();
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="MM_preloadImages('Images/more1A.gif','Images/more1B2.gif','Images/news/go2.gif')">
<table width="1002" height="863" border="0" align="center" cellpadding="0" cellspacing="0" background="Images/topbg.gif" class="bg02">
<tr>
<td width="29" height="863" align="left" valign="top"> </td>
<td width="944" height="863" align="left" valign="top">
<!-- header -->
<!--#include file="header.asp"-->
<!-- end header -->
<table width="944" height="170" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="944" height="170" align="left" valign="top"><img src="Images/product/banner.jpg" width="944" height="170" /></td>
</tr>
</table>
<table width="944" height="473" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="210" height="473" align="center" valign="top" background="Images/company/leftbg.gif" class="bg02"><table width="183" height="38" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="183" height="38" align="left" valign="top"><table width="170" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="170" height="29" align="left" valign="bottom"><img src="Images/company/quickmenu.gif" width="114" height="13" /></td>
</tr>
</table></td>
</tr>
</table>
<table width="183" height="37" border="0" cellpadding="0" cellspacing="0">
<%
bid = clng(request("productClassID"))
if Isnull(bid) then bid = 27
Dim ClassName
Set Rs = DB.GetAll("ProductClass","where ParentID=0","order by productclassid asc")
If Not Rs.Eof And Not Rs.Bof Then
ClassName = Rs.Fields("classname")
End If
do until Rs.eof
%>
<%
rid = Rs("productclassID")
if bid <> rid then
bg="Images/company/menubg2.gif"
else
bg="Images/company/menubg1.gif"
end if
%>
<tr>
<td width="183" height="37" align="center" valign="top" background="<%=bg%>" class="bg01"><table width="118" height="27" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="118" height="27" align="left" valign="middle" class="zi03B"><a href="product.asp?productClassID=<%=Rs("productclassID")%>" class="zi03"><%=Rs("classname")%></a></td>
</tr>
</table></td>
</tr>
<%
Rs.MoveNext()
loop
Rs.close
%>
</table></td>
<form name="form1" action="" method="post">
<input type="hidden" name="productClassID" value="<%=Request("productClassID")%>" />
<td width="734" align="right" valign="top"><table width="714" height="38" border="0" cellpadding="0" cellspacing="0" background="Images/line.gif" class="bg03">
<tr>
<td width="714" height="38" align="left" valign="top"><table width="680" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30" height="30" align="left" valign="bottom"><img src="Images/company/sz.gif" width="15" height="15" /></td>
<td width="220" height="30" align="left" valign="bottom"><img src="Images/product/pro.gif" width="144" height="17" /></td>
<%
sid = request("productClassID")
if sid = "" then sid = 27
set Rss = server.CreateObject("adodb.recordset")
sqll = "SELECT classname FROM ProductClass WHERE ProductclassID ="&sid
rss.open sqll,conn,1,1
if not rss.eof or rss.bof then
classname = rss("classname")
end if
rss.close
%>
<td width="430" height="30" align="right" valign="bottom" class="zi01"><a href="index.asp" class="zi01">首页</a> > <a href="product.asp" class="zi01">产品展示</a> > <%=classname%></td>
</tr>
</table></td>
</tr>
</table>
<table width="714" height="206" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="714" height="206" align="center" valign="bottom"><table width="190" border="0" cellspacing="0" cellpadding="0">
<!-- start loop -->
<tr>
<%
Dim Orders,strSQL
PageNum =6
PageIndex = Request.QueryString("PageIndex")
If PageIndex = "" Or PageIndex = 0 Then PageIndex = 1
Orders = Request.QueryString("Orders")
If Orders = "" Then
Orders = "ORDER BY ProductID DESC"
End If
productClassID = Request.QueryString("productClassID")
if ProductClassID <> ""then
strSQL = "WHERE productClassID =" & productClassID
else
strSQL = "where ProductStatus=true"
end if
style = "zi01"
Set Rs = DB.GetRs("product",strSQL,Orders,PageNum,PageIndex,RecordCount,PageCount)
Link = "product.asp?productClassID="&productClassID
If Not Rs Is Nothing Then
Index=0
While Not Rs.EOF And Index < PageNum
%>
<!-- one proudct -->
<td width="190" height="176" align="left" valign="top"><table width="190" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190" height="140" align="center" valign="middle" class="bk02"><a href="product_show.asp?action=common&ID=<%=rs.Fields("productID")%>" target="_blank"><img src="product/<%=rs.Fields("SmallImg")%>" width="180" height="130" border="0" /></a></td>
</tr>
<tr>
<td width="190" height="5"></td>
</tr>
<tr>
<td width="190" height="31" align="center" valign="middle" class="bk02"><span class="zi01"><%=rs("ProductName")%></span></td>
</tr>
</table></td>
<td> </td>
<!-- end product -->
<%
Index=Index+1
if Index mod 3=0 then
Response.Write("</tr><br><tr><td> </td></tr><tr>")
end if
Rs.MoveNext
Wend
' End If
else
%>
<td>暂时没有产品</td></tr>
<%
end if
%>
<!-- end loop -->
</table></td>
</tr>
</table>
<table width="714" height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="714" height="60" align="center" valign="bottom"><table width="640" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="431" height="26" align="right" valign="middle" bgcolor="#F1F1F1" class="bk03"><span class="zi01"><%=BH.SetPage(Link,PageIndex,PageCount,PageNum,RecordCount,style)%> To
<input name="PageIndex" style=" width:40px; height:10px" size="7" class="zi01" />
Page
</span></td>
<td width="65" height="26" align="center" valign="middle" bgcolor="#F1F1F1" class="bk03"><span class="zi01"><a href="javascript:changpage()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image171','','Images/news/go2.gif',1)"><img src="Images/news/go.gif" name="Image171" width="36" height="16" border="0" id="Image171" /></a><a href="#"></a></span></td>
<td width="144" height="26" align="center" valign="middle" bgcolor="#F1F1F1" class="bk03"> </td>
</tr>
</table></td>
</tr>
</table></td>
</form>
</tr>
</table>
<!-- #include file="footer.asp"-->
</td>
<td width="29" height="863" align="left" valign="top"> </td>
</tr>
</table>
</body>
</html>
补充:.NET技术 , ASP.NET