我想搜索我的网站数据库并显示结果和图像

我想搜索我的网站数据库并显示结果和图像

本文介绍了我想搜索我的网站数据库并显示结果和图像,但是出现错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@Language = "vbscript" %>
<%
Dim strSearch
Dim rsSearch
Dim conn
strSarch = Request.QueryString("txtSearch")
dim strconn
strconn="DRIVER=Microsoft Access Driver (*.mdb);DBQ="
strconn = strconn & Server.MapPath("property_users1.mdb")
set rsSearch = Server.CreateObject("ADODB.Recordset")
strSearch = "SELECT  Brief,Area,City,Country,Telephone " & "FROM [registration] " & "WHERE City LIKE  '" & Replace(strSarch, "'", "''") & "%' "

rsSearch.open strSearch, strconn, 2,2
<%
<table>
<%
while Not rsSearch.eof
<%<tr>rsSearch("Brief")</tr> %>
<%<tr>rsSearch("Area")</tr>%>
<%<tr>rsSearch("City")</tr>%>
<%<tr>rsSearch("Country")</tr>%>
<%<tr>rsSearch("Telephone")</tr>%>
rsSearch.Movenext
<%
<% </table> %>
Wend
%>

推荐答案

<%
Dim strSearch


但我看不到关闭标签!
(还有其他一些标签!)

还有一件事!我不确定,但就我所记得的一样,您必须使用<%=来将它们写到您的页面中.


but I can not see the close tag!
(and also some other Tags! )

One thing else! I am not sure but as much as I remember you have to use <%= for writing them in your page.



这篇关于我想搜索我的网站数据库并显示结果和图像,但是出现错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 08:44