| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 393 人关注过本帖
标题:[求助]类型不匹配
只看楼主 加入收藏
yfen258
Rank: 1
等 级:新手上路
帖 子:266
专家分:0
注 册:2006-3-31
收藏
 问题点数:0 回复次数:4 
[求助]类型不匹配
错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配
/blog/baojianpin/qiyezs.asp, 第 80 行
标红色为第 80 行



<!--#include file="conn.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
background-image:
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
-->
</style>
<style type="text/css">
<!--
.style2 {font-size: 14px}
body,td,th {
color: #333333;
}
a:link {
color: #333333;
text-decoration: none;
}
a:visited {
color: #666666;
text-decoration: none;
}
a:active {
color: #FF3300;
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #3399FF;
}
-->
</style>
</head>
<body>
<div align="center">
<table width="110" height="126" border="1" bordercolor="#6699CC" cellpadding="0" cellspacing="0">
<%
set rs=server.createobject("adodb.recordset")
page=request("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
sql="select * from baojianpin order by date DESC"
rs.open sql,conn,3,1
if rs.eof and rs.bof then
%>
<tr>
<td height="26" colspan="2" valign="middle">
<div align="center"><font color="#FF0000" size="3">没有记录</font></div>
</td>
</tr>
<%
response.end
else
rs.pagesize=5
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim id(),gongsi(),tupian()
while not i<rs.pagesize
i=i+1
redim preserve id(i),gongsi(i),tupian(i)
id(i)=rs("id")
gongsi(i)=rs("gongsi")
tupian(i)=rs("tupian")
rs.movenext
wend
end if
%>
<%for i = 1 to ubound(id-1)%>
<td>

<div align="center">
<img border="0" src="
<%
if trim(tupian(i))="" then
response.Write("images/no.jpg")
else
response.Write(trim(tupian(i)))
end if
%>
" width="110" height="126"><br>
<a href="baojianpinxx.asp?id=<%=rs("id")%>" target="_blank" class="STYLE1">公司名称</a></div>
</td>
<%next%>
</table>
</div>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
搜索更多相关主题的帖子: 类型 
2007-03-28 17:04
阳光白雪
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:39
帖 子:2220
专家分:0
注 册:2005-11-18
收藏
得分:0 
<%for i = 1 to ubound(id)-1%>

ubound是计算数组的下标,id是数组怎么能 -1 呢!

专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
2007-03-28 17:06
yfen258
Rank: 1
等 级:新手上路
帖 子:266
专家分:0
注 册:2006-3-31
收藏
得分:0 
不-1就显示越界了,这应该没错的吧

2007-03-28 17:18
yfen258
Rank: 1
等 级:新手上路
帖 子:266
专家分:0
注 册:2006-3-31
收藏
得分:0 
&lt;%for i = 1 to ubound(id)-1%&gt;这样改还是不匹配的

2007-03-28 17:24
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
收藏
得分:0 
<%
response.end
else
rs.pagesize=5
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim id(),gongsi(),tupian()
while not i<rs.pagesize
i=i+1
redim preserve id(i),gongsi(i),tupian(i)
id(i)=rs("id")
gongsi(i)=rs("gongsi")
tupian(i)=rs("tupian")
rs.movenext
wend
dim n
n=i
end if
%>
<%for i = 1 to n%>

http://www./
2007-03-29 11:42
快速回复:[求助]类型不匹配
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018866 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved