爱郎的心广场舞:Microsoft VBScript 运行时错误 错误 '800a000d' 是什么意思?
来源:百度文库 编辑:高校问答 时间:2024/04/29 22:15:47
出错信息如下:
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: '[string: "Y"]'
/view_dept_01.asp,行 402
其中的'[string: "Y"]' 是什么啊,我刚学asp请教专家是怎么回事。
下面是view_dept_01.asp代码的400到413行:
<td height="20">
<div align="center"><font color="#FF0000" size="2">
<% if Rs_assessp.Fields.Item("point01").Value = 1 and Rs_assessp.Fields.Item("point02").Value = 0 Then 'start db_sc script %>
待主任审核
<% end if 'end db_sc script %>
</font><font size="2"> <font color="#FF6600">
<% if Rs_assessp.Fields.Item("point02").Value = 1 and Rs_assessp.Fields.Item("point03").Value = 0 Then 'start db_sc script %>
待员工表态
<% end if 'end db_sc script %>
</font> <font color="#006600">
<% if Rs_assessp.Fields.Item("point03").Value = 1 Then 'start db_sc script %>
已完成
<% end if 'end db_sc script %>
</font> </font></div></td>
Microsoft VBScript 运行时错误 错误 '800a000d'
类型不匹配: '[string: "Y"]'
/view_dept_01.asp,行 402
其中的'[string: "Y"]' 是什么啊,我刚学asp请教专家是怎么回事。
下面是view_dept_01.asp代码的400到413行:
<td height="20">
<div align="center"><font color="#FF0000" size="2">
<% if Rs_assessp.Fields.Item("point01").Value = 1 and Rs_assessp.Fields.Item("point02").Value = 0 Then 'start db_sc script %>
待主任审核
<% end if 'end db_sc script %>
</font><font size="2"> <font color="#FF6600">
<% if Rs_assessp.Fields.Item("point02").Value = 1 and Rs_assessp.Fields.Item("point03").Value = 0 Then 'start db_sc script %>
待员工表态
<% end if 'end db_sc script %>
</font> <font color="#006600">
<% if Rs_assessp.Fields.Item("point03").Value = 1 Then 'start db_sc script %>
已完成
<% end if 'end db_sc script %>
</font> </font></div></td>
你这样写的话Rs_assessp.Fields.Item("point01").Value = 1,如果你的这个字段point01是字符类型的就会出错,建议这里把所有的判断表达式右边都加一对双引号:
if Rs_assessp.Fields.Item("point01").Value = "1" and Rs_assessp.Fields.Item("point02").Value = "0" Then
...
数据库里不是数字型的吧??
= 1
改成 ='1'
= 0
改成 ='0'
类型不匹配,请检查写入数据库的字段类型!
确定是不是定义了Y模块
代码贴的全点