站长简历 | 服务项目 | 成功案例 | 联系方式 | 过客留言 | 友情链接
   
网站首页 | 操作系统 | 办公软件 | 网络软件 | 工具软件 | 媒体动画 | Flash剧场 | 网站设计 | 网站开发 | 平面设计 | 关于站长
 
JScript用户手册 | VBScript用户手册 | ASP用户手册 | PHP用户手册 | ADO程序员手册 | 网页特效 | 3DS MAX6.0命令大全
 您现在的位置:网站首页 >> 网站开发 >> ASP >> 文章正文  
 
使用索引服务器 - 创建ASP页面
作者:不详  出处:http://www.goodsgy.com  更新日期:2005-01-28

在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")






在百度中搜索:使用索引服务器 - 创建ASP页面


上一篇:使用索引服务器 - 使用索引服务器的对象
下一篇:使用索引服务器 - 增加属性

  文章搜索
 
  MY广告
 
  本类热点
·SQL语句优化技术分析
·使用NextRecordse
·介绍一种效率极高的分类算法!
·ASP编写完整的一个IP所在
·远程脚本调用(Remote
·使用ASP.NET加密口令
·在SQL Server中保存
·ASP.NET高级应用(1)
·ASP.NET高级应用(2)
·ASP.NET高级应用(3)
 
  特别声明
  本站的大部分资料、文章都来自网上收集,其版权归作者本人所有,如果有任何侵犯您权益的地方,请与我联系,我们将马上进行整理,谢谢。
 
  网站导航  
操作系统 办公软件 网络软件
Windows2003 WindowsXP Windows2000/NT Windows9X/ME Linux 其他 Word Excel Access Powerpoint Outlook WPS 其他 网页浏览 上传下载 联络聊天 邮件工具 服务器软件 网络辅助
工具软件 媒体动画 网站设计
系统工具 媒体工具 压缩工具 图文处理 文件管理 其他 3DMAX Authorware Director Maya/SoftImage/Rhino 视频处理 其他 Flash Dreamweaver FireWorks FrontPage LiveMotion Golive HTML/CSS 其它
网站开发 平面设计 Flash剧场
ASP JSP PHP CGI JavaScript VBScript XML/SOAP Web服务器 Photoshop/ImageReady PhotoImpact CorelDraw Freehand/Illustrator 设计欣赏 其他 Flash MTV Flash小品 Flash游戏 Flash贺卡 Flash宣传 Flash专辑

冀ICP备05019428号
Copyright goodsgy Inc.All rights reserved.
TEL:13832340607
E_Mail:good_sgy@tom.com  
MSN:goodsgy@hotmail.com