主题:请教一个入门级问题
各位好,我是初学者,请各位多多关照。我的代码
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml where 1gaobipei<>0 or 1gaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml where 2wanbipei<>0 or 2wanxp<>0"
elseif lbdm=12 then
sql="select * from zxml where 1chubipei<>0 or 1chuxp<>0"
elseif lbdm=22 then
sql="select * from zxml where 2chubipei<>0 or 2chuxp<>0"
elseif lbdm=32 then
sql="select * from zxml where 3chubipei<>0 or 3chuxp<>0"
end if
%>
这样运行没有错误,但在后面加上另一语句后就出问题了
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml where 1gaobipei<>0 or 1gaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml where 2wanbipei<>0 or 2wanxp<>0"
elseif lbdm=12 then
sql="select * from zxml where 1chubipei<>0 or 1chuxp<>0"
elseif lbdm=22 then
sql="select * from zxml where 2chubipei<>0 or 2chuxp<>0"
elseif lbdm=32 then
sql="select * from zxml where 3chubipei<>0 or 3chuxp<>0"
end if
[color=FF0000] rs.open sql,conn,1,1[/color]
%>
错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 '1gaobipei<>0 or 1gaoxp<>0' 中。
/index.asp, 第 61 行
这里的61行就是红色的这一行。请各位指教。谢谢。
[color=C0C0C0][color=FF00FF]
[size=2]------------------------以上问题解决,新问题如下--------------------------[/size][/color][/color]
代码
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml2000 where yigaobipei<>0 or yigaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml2000 where erwanbipei<>0 or erwanxp<>0"
elseif lbdm=12 then
sql="select * from zxml2000 where yichubipei<>0 or yichuxp<>0"
elseif lbdm=22 then
sql="select * from zxml2000 where erchubipei<>0 or erchuxp<>0"
elseif lbdm=32 then
sql="select * from zxml2000 where sanchubipei<>0 or sanchuxp<>0"
end if
[color=FF0000] rs.open sql,conn,1,1[/color] %>
错误类型:
Microsoft JET Database Engine (0x80040E10)
至少一个参数没有被指定值。
/index.asp, 第 64 行
这里的64行就是红色这一行。
谢谢各位师父,请多关照。
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml where 1gaobipei<>0 or 1gaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml where 2wanbipei<>0 or 2wanxp<>0"
elseif lbdm=12 then
sql="select * from zxml where 1chubipei<>0 or 1chuxp<>0"
elseif lbdm=22 then
sql="select * from zxml where 2chubipei<>0 or 2chuxp<>0"
elseif lbdm=32 then
sql="select * from zxml where 3chubipei<>0 or 3chuxp<>0"
end if
%>
这样运行没有错误,但在后面加上另一语句后就出问题了
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml where 1gaobipei<>0 or 1gaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml where 2wanbipei<>0 or 2wanxp<>0"
elseif lbdm=12 then
sql="select * from zxml where 1chubipei<>0 or 1chuxp<>0"
elseif lbdm=22 then
sql="select * from zxml where 2chubipei<>0 or 2chuxp<>0"
elseif lbdm=32 then
sql="select * from zxml where 3chubipei<>0 or 3chuxp<>0"
end if
[color=FF0000] rs.open sql,conn,1,1[/color]
%>
错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 '1gaobipei<>0 or 1gaoxp<>0' 中。
/index.asp, 第 61 行
这里的61行就是红色的这一行。请各位指教。谢谢。
[color=C0C0C0][color=FF00FF]
[size=2]------------------------以上问题解决,新问题如下--------------------------[/size][/color][/color]
代码
<%set rs=server.CreateObject("adodb.recordset")
if lbdm=14 then
sql="select * from zxml2000 where yigaobipei<>0 or yigaoxp<>0"
elseif lbdm=23 then
sql="select * from zxml2000 where erwanbipei<>0 or erwanxp<>0"
elseif lbdm=12 then
sql="select * from zxml2000 where yichubipei<>0 or yichuxp<>0"
elseif lbdm=22 then
sql="select * from zxml2000 where erchubipei<>0 or erchuxp<>0"
elseif lbdm=32 then
sql="select * from zxml2000 where sanchubipei<>0 or sanchuxp<>0"
end if
[color=FF0000] rs.open sql,conn,1,1[/color] %>
错误类型:
Microsoft JET Database Engine (0x80040E10)
至少一个参数没有被指定值。
/index.asp, 第 64 行
这里的64行就是红色这一行。
谢谢各位师父,请多关照。