国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

使用索引服務器 - 創建ASP頁面

2019-11-18 21:19:28
字體:
來源:轉載
供稿:網友
創建asp頁面

  在ASP頁面上一切都變得非常酷。你用表單中的值來驅動對索引服務器進行查詢的對象。

整個過程是這樣的:

◆ 打開記錄集。
◆ 用標準ADO 方法,一步步地走過記錄集。

<%
"Create a Query object, initialize it using
"SetQueryFromURL, and dump the object state

"set the query object
Set objQuery = Server.CreateObject("ixsso.Query")

"get the query PRoperties set from the
"incoming URL (from the form GET Operation)
objQuery.SetQueryFromURL(Request.QueryString)

"tell the object what columns to include
objquery.columns="filename,HitCount,vpath,DocTitle,characterization"

"open the recordset, causing the query to be
"executed
set rsQuery = objquery.createrecordset("nonsequential")

"now, if rsquery.eof is not TRUE, then we have results
"to show. If it IS TRUE, no results were found.

"get the page out for the user...
%>

<html>
<head>
</head>

<h1>Search Results</h1>
A maximum of 200 results will be returned, 20 hits per page will be shown. <br><br>
<%
if not rsquery.eof then
Response.Write rsquery.recordcount & " hit(s) were found. "
if rsquery.recordcount > 30 then
Response.Write "You may want to refine your query."
end if
Response.Write "<br>"
end if
%>

<%
if not rsquery.eof then
while not rsquery.eof and rowcount > 0
if rsquery("doctitle") <> "" then
Response.Write "<p><b><a href="" & rsquery("vpath") & "">" & rsquery("doctitle") & "</a></b><br>"
response.write "<font size=-1>" & rsquery("characterization") & "...</font><Br>"
Response.Write "<font size=- 2>" & rsquery("hitcount") & " hit(s)</font></p>"
end if
rowcount = rowcount - 1
rsquery.movenext
wend
Response.Write "<br><Br>"
%>


<%
else
%>

<p>
對不起,沒有發現紀錄,如果要查詢兩個以上的詞,使用and或or。
</p>

<%
end if
%>

</body>
</html>



  你需要做的第一件事就是建立對索引服務器對象的引用。這是通過使用server.creatobject方法來完成的:


Set objQuery = Server.CreateObject("ixsso.Query")   
作者/出處:青蘋果工作室

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 海宁市| 西青区| 巴马| 鄂温| 利川市| 石林| 澎湖县| 遂溪县| 苏尼特右旗| 元阳县| 洪湖市| 从化市| 堆龙德庆县| 黑龙江省| 宁陵县| 抚顺县| 女性| 碌曲县| 高要市| 广西| 理塘县| 句容市| 贺兰县| 临沂市| 昌都县| 阿城市| 湖南省| 赫章县| 如东县| 永和县| 西和县| 湖州市| 宁化县| 开封市| 成武县| 耿马| 利川市| 庄浪县| 象州县| 克什克腾旗| 鄂州市|