+ -
当前位置:首页 → 问答吧 → 参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

时间:2011-10-17

来源:互联网

<% 
dim tiaojian1,neirong1
tiaojian1=trim(request("tiaojian"))
neirong1=trim(request("neirong"))

set rs=server.CreateObject("ADODB.Recordset")
select case tiaojian
case "1"
sql="select * from stu_info where stu_id like '%"&neirong1&"%'"
case "2"
sql="select * from stu_info where stu_name like '%"&neirong1&"%'"
case "3"
sql="select * from stu_info where stu_sex like '%"&neirong1&"%'"
case "4"
sql="select * from stu_info where xibu like '%"&neirong1&"%'"
case "5"
sql="select * from stu_info where zhuanye like '%"&neirong1&"%'"
case "6"
sql="select * from stu_info where banji like '%"&neirong1&"%'"
end select 
rs.open sql,conn,1,3 。。。。出错位置
rs.Pagesize=5
if(rs.bof and rs.eof) then
response.Write("<script>alert('对不起没有您要查询的信息!');</script>"+"<font size='5' color='red'>对不起,没有相关数据!</font>")
response.End()
else
%>
<table width="800" height="25" border="1" cellpadding="0" cellspacing="0">
后面是进行数据的显示。 而且conn 也是有定义 引入的,但就是会出错!

作者: cyn336   发布时间: 2011-10-17

试试 Rs.Open Sql,conn,3,3

作者: anndy1999   发布时间: 2011-10-19