[在线等,急]在ASP中实现站内搜索搜索,已完成SQL语句 130
<!--#includefile="Connections/data.asp"--><%setdataset=server.CreateObject("ADODB.Rec...
<!--#include file="Connections/data.asp" -->
<%set dataset=server.CreateObject("ADODB.RecordSet")
sqlstr="select * from DOG where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') D_Kitname='"+reequest.form("Kitname")+"'"
dataset.open strsql,dsnstr,3,1
if dataset.eof then
response.write("没有你要查找的内容")
else
response.redirect("page1.asp")
end if
%>
总是说Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/DOG/Untitled-1.asp, 第 12 行
如何修改或者重新帮我做一个
<!--#include file="connections/data.asp" -->
<%
set rs=server.createobject("ADODB.recordset")
rs.open "select * from [DOG] where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') D_Kitname='"+request.form("Kitname")+"'"
dataset.open strsql,dsnstr,1,1
if not rs.eof then
if request.Form("D_Kitname")=rs("Kitname") then
Response.Write("<a href='page1.asp?key="&rs("U_name")&"'></a>")
else
response.End()
end if
Response.Write("没有你要查找的内容!")
Response.Write("<script language=""JavaScript"">alert(""用户不存在!"");history.go(-1);</script>")
else
response.End()
end if
response.redirect("page1.asp")
%>
<%=Request.QueryString("D_Kitname")%>
<%
rs.movenext()
wend %>
<%
rs.Close()
Set rs = Nothing
%>
显示:
Microsoft VBScript 编译器错误 (0x800A0400)
缺少语句
/froum/index1.asp, line 29
wend 展开
<%set dataset=server.CreateObject("ADODB.RecordSet")
sqlstr="select * from DOG where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') D_Kitname='"+reequest.form("Kitname")+"'"
dataset.open strsql,dsnstr,3,1
if dataset.eof then
response.write("没有你要查找的内容")
else
response.redirect("page1.asp")
end if
%>
总是说Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/DOG/Untitled-1.asp, 第 12 行
如何修改或者重新帮我做一个
<!--#include file="connections/data.asp" -->
<%
set rs=server.createobject("ADODB.recordset")
rs.open "select * from [DOG] where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') D_Kitname='"+request.form("Kitname")+"'"
dataset.open strsql,dsnstr,1,1
if not rs.eof then
if request.Form("D_Kitname")=rs("Kitname") then
Response.Write("<a href='page1.asp?key="&rs("U_name")&"'></a>")
else
response.End()
end if
Response.Write("没有你要查找的内容!")
Response.Write("<script language=""JavaScript"">alert(""用户不存在!"");history.go(-1);</script>")
else
response.End()
end if
response.redirect("page1.asp")
%>
<%=Request.QueryString("D_Kitname")%>
<%
rs.movenext()
wend %>
<%
rs.Close()
Set rs = Nothing
%>
显示:
Microsoft VBScript 编译器错误 (0x800A0400)
缺少语句
/froum/index1.asp, line 29
wend 展开
5个回答
展开全部
D_Kitname like '%约克夏%') D_Kitname='"+reequest.form("Kitname")+"'"
改成
D_Kitname like '%约克夏%') or D_Kitname='"+request.form("Kitname")+"'"
另外,老大。。你这么查询。。这么多or 总感觉有问题··
---------------------------------------
说了呢···
or( D_Kitname like '%约克夏%') D_Kitname='"+request.form
你这里
( D_Kitname like '%约克夏%') D_Kitname
怎么可以这么写呢
至少要一个or或者and吧
( D_Kitname like '%约克夏%') or D_Kitname
改成
D_Kitname like '%约克夏%') or D_Kitname='"+request.form("Kitname")+"'"
另外,老大。。你这么查询。。这么多or 总感觉有问题··
---------------------------------------
说了呢···
or( D_Kitname like '%约克夏%') D_Kitname='"+request.form
你这里
( D_Kitname like '%约克夏%') D_Kitname
怎么可以这么写呢
至少要一个or或者and吧
( D_Kitname like '%约克夏%') or D_Kitname
展开全部
sqlstr="select * from DOG where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') D_Kitname='"+reequest.form("Kitname")+"'"
dataset.open strsql,dsnstr,3,1
改为
sqlstr="select * from DOG where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') and D_Kitname='"+reequest.form("Kitname")+"'"
dataset.open strsql,dsnstr,1,1
dataset.open strsql,dsnstr,3,1
改为
sqlstr="select * from DOG where (D_Kitname like '%松狮%')or( D_Kitname like '%金毛%')or(D_Kitname like '%博美%')or( D_Kitname like '%萨摩%') or ( D_Kitname like '%哈士奇%')or( D_Kitname like '%约克夏%') and D_Kitname='"+reequest.form("Kitname")+"'"
dataset.open strsql,dsnstr,1,1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
D_Kitname='"+reequest.form("Kitname")+"'"
reequest这个地方多打了个e。。
下边用1,1
暂时只看到这些问题
reequest这个地方多打了个e。。
下边用1,1
暂时只看到这些问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
D_Kitname='"+reequest.form("Kitname")+"'"
貌似多了个e
貌似多了个e
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
查询语句有问题
改为:
sqlstr="select * from DOG where ( D_Kitname like '%松狮%' or D_Kitname like '%金毛%' or D_Kitname like '%博美%' or D_Kitname like '%萨摩%' or D_Kitname like '%哈士奇%' or D_Kitname like '%约克夏%' ) and D_Kitname='"&request.form("Kitname")&"' "
改为:
sqlstr="select * from DOG where ( D_Kitname like '%松狮%' or D_Kitname like '%金毛%' or D_Kitname like '%博美%' or D_Kitname like '%萨摩%' or D_Kitname like '%哈士奇%' or D_Kitname like '%约克夏%' ) and D_Kitname='"&request.form("Kitname")&"' "
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询