Microsoft VBScript runtime error '800a000d'

cslasp 2003-05-07 04:55:57
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'displaysmallworkrec'

/oa/asp/monthlycal.asp, line 42
----------------------------------------
monthlycal.asp:
<!--#include file="displaysmallworkrec.asp"-->

<%
sub monthlycal(username,superior)
oabusyusername=request.cookies("oabusyusername")

'取得当前年月的1日日期
thismonthfirday=myyear & "-" & mymonth & "-1"
'取得下个月1日的日期
nextmonthfirday=dateadd("m",1,thismonthfirday)
'取得当前月的天数
totaldays=DateDiff("d",thismonthfirday,nextmonthfirday)

'response.write "这个月有:" & totaldays & "天"
'取得取得本月1日的星期数
firdayweek=weekday(thismonthfirday)

%>
<center>
<table border=1 width=95% bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#66aa77">
<td align=center width="14%"><font color="#FFFFFF">星期日 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期一 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期二 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期三 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期四 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期五 </font></td>
<td align=center width="14%"><font color="#FFFFFF">星期六 </font></td>
</tr>
<%
for i=1 to 7
if firdayweek=i then
string1="<tr>"
j=1
do while j<i
string1=string1 & "<td> </td>"
j=j+1
loop
if firdayweek=1 or firdayweek=7 then
string1=string1 & "<td valign=top align=center bgcolor='#E2F1D8'>" & displaysmallworkrec(thismonthfirday,username,superior) & "</td>"
else
。。。。。。。。。。
42行:string1=string1 & "<td valign=top align=center>" & displaysmallworkrec(thismonthfirday,username,superior) & "</td>"
。。。。。。。。。。。
end if
end if
next
if firdayweek=7 then string1=string1 & "</tr>"
response.write string1

for i=2 to totaldays-1
if weekday(myyear & "-" & mymonth & "-" & i)=1 then response.write "<tr><td valign=top align=center bgcolor='#E2F1D8'>" & displaysmallworkrec(myyear & "-" & mymonth & "-" & i,username,superior) & "</td>"
if weekday(myyear & "-" & mymonth & "-" & i)=7 then response.write "<td valign=top align=center bgcolor='#E2F1D8'>" & displaysmallworkrec(myyear & "-" & mymonth & "-" & i,username,superior) & "</td></tr>"
if weekday(myyear & "-" & mymonth & "-" & i)<>7 and weekday(myyear & "-" & mymonth & "-" & i)<>1 then response.write "<td valign=top align=center>" & displaysmallworkrec(myyear & "-" & mymonth & "-" & i,username,superior) & "</td>"
next

for i=1 to 7
if weekday(myyear & "-" & mymonth & "-" & totaldays)=i then
if weekday(myyear & "-" & mymonth & "-" & totaldays)=1 or weekday(myyear & "-" & mymonth & "-" & totaldays)=7 then
string2="<td valign=top align=center bgcolor='#E2F1D8'>" & displaysmallworkrec(myyear & "-" & mymonth & "-" & totaldays,username,superior) & "</td>"
else
string2="<td valign=top align=center>" & displaysmallworkrec(myyear & "-" & mymonth & "-" & totaldays,username,superior) & "</td>"
end if
j=7
do while j>i
string2=string2 & "<td> </td>"
j=j-1
loop
string2=string2 & "</tr>"
end if
next
if weekday(myyear & "-" & mymonth & "-" & totaldays)=1 then string2="<tr>" & string2 & "</tr>"
response.write string2
%>
</table>
</center>
<br>
<%
end sub
%>
<html></html>
-----------------------------

...全文
94 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
annyking 2003-05-07
  • 打赏
  • 举报
回复
sub monthlycal(username,superior)
oabusyusername=request.cookies("oabusyusername")
myyear =year (now())
mymonth=month(now())
'取得当前年月的1日日期
thismonthfirday=myyear & "-" & mymonth & "-1"
'取得下个月1日的日期
nextmonthfirday=dateadd("m",1,thismonthfirday)
.....

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧