错误类型: (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)%> </td>
<%
rsc.MoveNext
else
'没找到当月的纪录,输出空
%>
<td align="right"> </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"> <%=mT2%> </td>
</tr>
------解决方案--------------------
RsC(0) 改成 RsC(0).value 试下