选择显示字体大小

使用索引服务器 - 创建asp页面

     创建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")
  
  
  
    


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons