日期:2014-05-17  浏览次数:20914 次

错误类型: (0x80020009) 发生意外。 /1.asp, 第 222 行
tr>
  <td>永城</td>
  <%sql = "Select month(date) as mth_idx , COUNT(*) From tzxxb where fgs='永城分公司' "
if len(year1) > 0 then 
sql = sql & " and year(date) = " &year1 
end if 
sql = sql & " Group By month(date) "
sql = sql & " order by month(date) "

Set RsC=Conn.Execute(sql)
dim mTot2(13)
for i = 1 to 12
mTot2(i) = 0
next
If RsC.bof and rsc.eof Then
mTot2(i) = 0
else
'输出每个月的数据
for i = 1 to 12 
if RsC(0) = i then
'找到当月的纪录,输出,记录后移 
mTot2(i) =RsC(1)
%> 
<td align="right"><%=mTot2(i)%>&nbsp;</td> 
<% 
rsc.MoveNext 
else 
'没找到当月的纪录,输出空 
%> 
<td align="right">&nbsp;</td> 
<% 
end if
next 
RsC.Close 
Set RsC=Nothing 
End If
mT2=mTot2(1)+mTot2(2)+mTot2(3)+mTot2(4)+mTot2(5)+mTot2(6)+mTot2(7)+mTot2(8)+mTot2(9)+mTot2(10)+mTot2(11)+mTot2(12)
%>
<td align="right">&nbsp;<%=mT2%>&nbsp;</td>
</tr>

------解决方案--------------------
RsC(0) 改成 RsC(0).value 试下