急,急,急,简单的问题

momocat 2004-04-28 11:45:41
set jianjie=lj.execute("select jianjie from huiyuan where mingzi='" & server.HTMLEncode(mingzi) & "' ")
if jianjie=1 then
response.redirect "1.asp"
elseif jianjie=2 then
response.redirect "2.asp"
elseif jianjie=3 then
Response.Redirect "3.asp"

end if

运行后出错Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

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

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

类型不匹配

/oa/b_look.asp,行10

我的huiyuan表里jianjie数据项是数值型
...全文
42 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
diveas 2004-04-28
  • 打赏
  • 举报
回复
你少了2个 End If
diveas 2004-04-28
  • 打赏
  • 举报
回复
set jianjie=lj.execute("select jianjie from huiyuan where mingzi='" & server.HTMLEncode(mingzi) & "' ")
if jianjie=1 then
response.redirect "1.asp"
elseif jianjie=2 then
response.redirect "2.asp"
elseif jianjie=3 then
Response.Redirect "3.asp"

End If
End If
end if
skyboy0720 2004-04-28
  • 打赏
  • 举报
回复
jianjie("jianjie")=.xxxx
momocat 2004-04-28
  • 打赏
  • 举报
回复
jianjie是数值型,原来是文本型的jianjie="1"也出同样的错误
huhanshan013 2004-04-28
  • 打赏
  • 举报
回复
jianjie=1 是什么东西啊?

好象是
jianjie("jianjie")=1

这样吧?
aoenzh 2004-04-28
  • 打赏
  • 举报
回复
if jianjie=1 then
response.redirect "1.asp"
end if
if jianjie=2 then
response.redirect "2.asp"
end if
if jianjie=3 then
Response.Redirect "3.asp"
end if
这样试试看
wdyxt 2004-04-28
  • 打赏
  • 举报
回复
jianjie的类型是什么呀
if jianjie="1" then 这样试试
pj0643 2004-04-28
  • 打赏
  • 举报
回复
1、检查sql语句中的where语句mingzi的值是字符还是数字,字符型才用‘’
2、如果返回值是字符在if语句中使用="1"
QQgenie 2004-04-28
  • 打赏
  • 举报
回复
为什么要把简单的事情复杂化呢?

没少END IF

set rs=lj.execute("select jianjie from huiyuan where mingzi='" & server.HTMLEncode(mingzi) & "' ")
jianjie = rs("jianjie") '用这个取出jianjie再判断吧
if jianjie=1 then
response.redirect "1.asp"
elseif jianjie=2 then
response.redirect "2.asp"
elseif jianjie=3 then
Response.Redirect "3.asp"

end if

28,390

社区成员

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

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