问题:类型不匹配: 'cint'

fgjat 2004-08-26 09:22:15
是一个asp文件!
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: 'cint'

/hstech/manage/track.asp,行13

代码如下 !!
Dim Condition
PageTitle="实时跟踪"
redim sel(3)
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
mkRND
Condition = IIF(trim(Request("Condition"))="",""," WHERE ma0617='" & trim(Request("Condition")) & "'")
If Condition<>"" Then
sel(cint(trim(Request("Condition"))))="selected"
End If

应该修改哪里呢?
...全文
351 24 打赏 收藏 转发到动态 举报
写回复
用AI写文章
24 条回复
切换为时间正序
请发表友善的回复…
发表回复
fgjat 2004-09-13
  • 打赏
  • 举报
回复
问题终于解决了!爽
顺子 2004-08-31
  • 打赏
  • 举报
回复
我幫你頂好了
fgjat 2004-08-31
  • 打赏
  • 举报
回复
xiey_398() 是狗哥吗?
我在 If Condition<>"" Then 后面加上
response.write(Condition)
response.end()

刷新得到页面显示

WHERE ma0617='2'
xiey_398 2004-08-31
  • 打赏
  • 举报
回复
在 If Condition<>"" Then 后面加上
response.write(Request("Condition"))
response.end()
fgjat 2004-08-31
  • 打赏
  • 举报
回复
Condition = IIF(trim(Request("Condition"))="","",trim(Request("Condition")) )
这样得到Condition 就返回2
然后
If Condition<>"" Then
sel(" WHERE ma0617='" & cint(trim(Request("Condition"))) & "'")="selected"
End If
得到
类型不匹配: '[string: " WHERE ma0617='2'"]'

/hstech/manage/track.asp,行13
cunheise 2004-08-31
  • 打赏
  • 举报
回复
iif是vb里面的asp中不能用的
fgjat 2004-08-31
  • 打赏
  • 举报
回复
在源代码里面
<td noWrap width="20%" ><%=IIF(rs("ma0602")=""," ",rs("ma0602"))%> </td>

“WHERE ma0617= ”
可能是用来
select* from table WHERE ma0617= '..'的
Tal 2004-08-31
  • 打赏
  • 举报
回复
sel(cint(trim(Request("Condition") & "")))="selected"
hanker9608 2004-08-31
  • 打赏
  • 举报
回复
我在 If Condition<>"" Then 后面加上
response.write(Condition)
response.end()

刷新得到页面显示

WHERE ma0617='2'
肯定不对了,它是一个字符串,所以在cint的时候就会有错

Condition = IIF(trim(Request("Condition"))="","",trim(Request("Condition")) )
这样的话Condition 就返回2,可以进行cint操作了


不明白你WHERE ma0617=是干什么用的?
fgjat 2004-08-31
  • 打赏
  • 举报
回复
to: mrshelly(Shelly)
按照你的意思去修改,有以下错误
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: ""]'

/hstech/manage/track.asp,行15
mrshelly 2004-08-31
  • 打赏
  • 举报
回复
if(Request("Condition")) then
sel(trim(Request("Condition")))="selected"
end if
fgjat 2004-08-31
  • 打赏
  • 举报
回复
问题还没有解决!~~~~
soso119 2004-08-26
  • 打赏
  • 举报
回复
要是你想變換的數位很大的話就用clng吧
fgjat 2004-08-26
  • 打赏
  • 举报
回复
to: sxsgssgs(晋乡浪子)

如果我在 If Condition<>"" Then 后面加上
response.write(Condition)
response.end()

刷新得到页面显示

WHERE ma0617='2'

这样的话可不可以用substring 获得Condition 为2
Condition11=Condition.substring(13,15);???
fgjat 2004-08-26
  • 打赏
  • 举报
回复
如果改成:
sel(clng(trim(Request("Condition"))))="selected"

问题一样
类型不匹配: 'clng'
bearzhan88 2004-08-26
  • 打赏
  • 举报
回复
condition的值要是超过25535的话,就会出现这情况,你用
clng()
sxsgssgs 2004-08-26
  • 打赏
  • 举报
回复
<%
redim sel(3)
Condition = "2" '这个地方必须是可以转换为整形的字符, 如果是"ssss"就不能被转换成整形。
Condition = cint(Condition)
sel(Condition)="selected"
response.write sel(Condition)

%>
fgjat 2004-08-26
  • 打赏
  • 举报
回复
有关于sel()的代码是这样的
redim sel(3)

.................
response.write "<option value=""0"" " & sel(0) & " style=""font-size:10pt;color:red"">未派单子</option>" & chr(13)
response.write "<option value=""1"" " & sel(1) & " style=""font-size:10pt;color:blue"">已派单子</option>" & chr(13)
response.write "<option value=""2"" " & sel(2) & ">完工单子</option>" & chr(13)
fgjat 2004-08-26
  • 打赏
  • 举报
回复
对!
如果 Condition不等于默认的值的话 ,
就是sel(X)="selected" sel()=选择的值
butcher2002 2004-08-26
  • 打赏
  • 举报
回复
你是不是想
sel(X)="selected"
这样付值啊?~
加载更多回复(4)

28,404

社区成员

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

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