下面这段代码为什么总出错,我觉得没有错啊,求救

coolcxl 2005-12-16 05:24:25
<%
totalpoint = rs("totalp")//从查询的结果中取数据
totallen = totalpoint/24
totalamt = totalpoint/24*0.06
%>

去掉
totallen = totalpoint/24
totalamt = totalpoint/24*0.06
这两句就没有错
...全文
94 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
超级大笨狼 2005-12-19
  • 打赏
  • 举报
回复
数据类型
tigerwen01 2005-12-19
  • 打赏
  • 举报
回复
totallen = (totalpoint/24)
totalamt = (totalpoint/24*0.06)
chaircat 2005-12-18
  • 打赏
  • 举报
回复
加上CLng()咯...
coolcxl 2005-12-16
  • 打赏
  • 举报
回复
是长整型的啊,eglic的不行啊
是是非非 2005-12-16
  • 打赏
  • 举报
回复
<%
If IsNull(rs("totalp")) Or Not IsNumeric(rs("totalp")) Then
totalpoint = 0
Else
totalpoint = rs("totalp")//从查询的结果中取数据
End If
totallen = totalpoint/24
totalamt = totalpoint/24*0.06
%>
cylon 2005-12-16
  • 打赏
  • 举报
回复
估计totalpoint在数据库里面不是数值型的字段

4,007

社区成员

发帖
与我相关
我的任务
社区描述
它是一种微软环境下的轻量级的解释型语言,它使用COM组件、WMI、WSH、ADSI访问系统中的元素,对系统进行管理。
社区管理员
  • vbScript社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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