Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
3.9 KiB

  1. <% Response.Expires = 0 %>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Test page 3 for IXSSO tests.</TITLE>
  5. </HEAD>
  6. <BODY BGCOLOR=FFFFFF LINK=0000FF ALINK=00DDDD>
  7. <H2>Test 3 for IXSSO.</H2>
  8. <P>
  9. Create a query object, set query parameters, execute query and instantiate
  10. a non-sequential recordset.
  11. Use ADO to iterate over all rows in the recordset and print fields from the
  12. storage property set.
  13. </P>
  14. <!--#include virtual="/IXSTest/prolog.inc"-->
  15. <%
  16. set Q=Server.CreateObject("IXSSO.Query")
  17. Q.Columns = "filename, rank, path, size, write"
  18. Q.Query = "#filename *.asp"
  19. Q.SortBy = "rank[d]"
  20. set Util=Server.CreateObject("IXSSO.Util")
  21. Util.AddScopeToQuery Q, "/"
  22. Q.Catalog = "web"
  23. Q.OptimizeFor = "recall"
  24. Q.AllowEnumeration = TRUE
  25. Q.MaxRecords = 20000
  26. %>
  27. <FONT SIZE=3>
  28. <PRE>
  29. Query = <%= Q.Query%>
  30. Columns = <%= Q.Columns%>
  31. SortBy = <%= Q.SortBy%>
  32. CiScope = <%= Q.CiScope%>
  33. CiFlags = <%= Q.CiFlags%>
  34. Catalog = <%= Q.Catalog%>
  35. CiMachine = <%= Q.CiMachine%>
  36. OptimizeFor = <%= Q.OptimizeFor%>
  37. AllowEnumeration = <%Response.Write(CStr(Q.AllowEnumeration))%>
  38. MaxRecords = <%= Q.MaxRecords%>
  39. </PRE>
  40. <%
  41. set RS=Q.CreateRecordSet( "nonsequential" )
  42. %>
  43. <PRE>
  44. QueryTimedOut = <%if Q.QueryTimedOut then Response.Write("TRUE") else Response.Write("FALSE") %>
  45. QueryIncomplete = <%if Q.QueryIncomplete then Response.Write("TRUE") else Response.Write("FALSE") %>
  46. OutOfDate = <%if Q.OutOfDate then Response.Write("TRUE") else Response.Write("FALSE") %>
  47. RS.EOF = <%if RS.EOF then Response.Write("TRUE") else Response.Write("FALSE") %>
  48. RS.BOF = <%if RS.BOF then Response.Write("TRUE") else Response.Write("FALSE") %>
  49. RS.RecordCount = <%= RS.RecordCount%>
  50. </PRE>
  51. <%
  52. RS.MoveFirst
  53. %>
  54. After RS.MoveFirst
  55. <PRE>
  56. RS.EOF = <%if RS.EOF then Response.Write("TRUE") else Response.Write("FALSE") %>
  57. RS.BOF = <%if RS.BOF then Response.Write("TRUE") else Response.Write("FALSE") %>
  58. </PRE>
  59. <TABLE COLSPAN=8 CELLPADDING=5 BORDER=0>
  60. <!-- BEGIN column header row -->
  61. <TR>
  62. <TH ALIGN=CENTER BGCOLOR="#800000">
  63. <FONT STYLE="ARIAL NARROW" COLOR="#ffffff" SIZE=1>File name</FONT>
  64. </TH>
  65. <TH ALIGN=CENTER BGCOLOR="#800000">
  66. <FONT STYLE="ARIAL NARROW" COLOR="#ffffff" SIZE=1>Rank</FONT>
  67. </TH>
  68. <TH ALIGN=CENTER WIDTH=150 BGCOLOR="#800000">
  69. <FONT STYLE="ARIAL NARROW" COLOR="#ffffff" SIZE=1>Path</FONT>
  70. </TH>
  71. <TH ALIGN=CENTER BGCOLOR="#800000">
  72. <FONT STYLE="ARIAL NARROW" COLOR="#ffffff" SIZE=1>Size</FONT>
  73. </TH>
  74. <TH ALIGN=CENTER BGCOLOR="#800000">
  75. <FONT STYLE="ARIAL NARROW" COLOR="#ffffff" SIZE=1>Write</FONT>
  76. </TH>
  77. </TR>
  78. <!-- BEGIN first row of query results table -->
  79. <% RecordNumber = 1 %>
  80. <% Do While Not RS.EOF %>
  81. <TR>
  82. <%if RecordNumber <> 1 then %>
  83. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  84. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS.Fields("FileName").Value%></FONT></TD>
  85. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  86. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS.Fields("Rank").Value%></FONT></TD>
  87. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  88. <FONT STYLE="ARIAL NARROW" SIZE=1><A HREF="file:<%=RS.Fields("Path").Value%>"><%=RS("Path").Value%></A></FONT></TD>
  89. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  90. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS.Fields("Size").Value%></FONT></TD>
  91. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  92. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS.Fields("Write").Value%></FONT></TD>
  93. <%else%>
  94. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  95. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS("FileName")%></FONT></TD>
  96. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  97. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS("Rank")%></FONT></TD>
  98. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  99. <FONT STYLE="ARIAL NARROW" SIZE=1><A HREF="file:<%=RS("Path")%>"><%=RS("Path")%></A></FONT></TD>
  100. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  101. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS("Size")%></FONT></TD>
  102. <TD BGCOLOR="f7efde" ALIGN=CENTER>
  103. <FONT STYLE="ARIAL NARROW" SIZE=1><%=RS("Write")%></FONT></TD>
  104. <%end if%>
  105. </TR>
  106. <%
  107. RS.MoveNext
  108. RecordNumber = RecordNumber+1
  109. Loop
  110. RS.close
  111. Set RS = Nothing
  112. %>
  113. </TABLE>
  114. <BR>
  115. <BR>
  116. <!--#include virtual="/IXSTest/srcform.inc"-->
  117. <BR>
  118. <BR>
  119. </BODY>
  120. </HTML>