注册 登录
编程论坛 ASP技术论坛

求助ASP的问题,Microsoft VBScript 运行时错误 错误 '800a005e' 无效使用 Null: 'CInt'

hcf136378745 发布于 2013-04-20 22:09, 929 次点击
Microsoft VBScript 运行时错误错误 '800a005e'无效使用 Null: 'CInt'/outinadd.asp,行 62。62行上和下的代码如下:end if
 sql="select medicalid,cname from medical order by medicalid"
 set mdrs=oConn.Execute(sql)
 if mdrs.eof then
  Response.Write "请在『药品管理』中 <a href=""medadd.asp"">录入药品信息</a> !"  
 ret=false
 end if
 if ret=true then   
 if init=false then   
 if optype=0 then   
 maxcount=CInt(rs("topcount"))-CInt(rs("curcount"))    '最大进货量   
 if maxcount<0 then   
   tmsg="药品数量已经超过仓库存储上限!"     
 maxcount=0   
 end if   
 else   
 maxcount=CInt(rs("curcount"))         '最大出货量     
if CInt(rs("curcount"))-CInt(rs("basecount"))<0 then     
 tmsg="药品数量已经低于仓库存储下限!"   
 end if   
 end if
  end if
代码哪错了,求解!
2 回复
#2
hu9jj2013-04-21 07:48
从代码上看,Cint似乎是自定义的函数,但没有看到这个函数是在哪定义的。
#3
zhuiis2013-04-25 23:14
maxcount=CInt(rs("topcount"))-CInt(rs("curcount"))    '最大进货量   
rs("topcount")
rs("curcount")
这两个字段中肯定出现了空值,应该先判断一下,另,CInt 可直接写为 int 。
1