home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / is20.cab / SQLQHit.asp < prev    next >
Encoding:
Text File  |  1997-08-15  |  3.2 KB  |  118 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Query Results from OLE DB Provider for Microsoft Index Server</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR=#FFFFFF>
  6. <P>
  7. <H3>These query results brought to you by the following Microsoft technologies:</H3>
  8. <UL>
  9. <LI> ActiveX Data Objects (ADO)
  10. <LI> Active Server Pages
  11. <LI> Index Server
  12. <LI> Internet Information Server
  13. <LI> The OLE DB Provider for Microsoft Index Server
  14. <LI> OLE DB
  15. <UL>
  16. <P>
  17.  
  18. <%' !--#INCLUDE VIRTUAL="/iissamples/issamples/ADOVBS.INC"--%>
  19. <%
  20. Set Conn = Server.CreateObject("ADODB.Connection")
  21. Conn.ConnectionString =  "provider=msidxs;"
  22. Conn.Open
  23. Set AdoCommand = Server.CreateObject("ADODB.Command")
  24. set AdoCommand.ActiveConnection = Conn
  25. %>
  26. Executing the following query:
  27.  
  28. <% if Request.QueryString("CiOrderBy")="" then %>
  29. <P><I>Select <%=Request.QueryString("CiColumns")%> from <%=Request.QueryString("CiScope")%> where <%=Request.QueryString("CiRestriction")%></I>
  30. <% else %>
  31. <P><I>SELECT <%=Request.QueryString("CiColumns")%> FROM <%=Request.QueryString("CiScope")%> WHERE <%=Request.QueryString("CiRestriction")%> ORDER BY <%=Request.QueryString("CiOrderBy")%></I>
  32. <% end if %>
  33.  
  34. <% if Request.QueryString("CiOrderBy")="" then %>
  35.  
  36.     <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" from " &Request.QueryString("CiScope")&" where "&Request.QueryString("CiRestriction") %>
  37.  
  38. <% else %>
  39.     <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" FROM " &Request.QueryString("CiScope")&" WHERE "&Request.QueryString("CiRestriction")&" ORDER BY " &Request.QueryString("CiOrderBy") %>
  40.  
  41. <% end if %>
  42.  
  43. <%
  44. Set RS = Server.CreateObject("ADODB.RecordSet")
  45. AdoCommand.Properties("Bookmarkable") = True
  46. 'RS.Properties("Bookmarkable") = True
  47. 'RS.CursorType = adOpenStatic
  48. 'RS.MaxRecords = 5
  49. RS.open AdoCommand
  50.  
  51. %>
  52. <P>
  53. <TABLE BORDER=1>
  54. <TR>
  55. <% For i = 0 to RS.Fields.Count - 1 %>
  56.     <TD><B><% = RS(i).Name %></B></TD>
  57. <% Next %>
  58. </TR>
  59.  
  60. <% Do While Not RS.EOF %>
  61.     <TR>
  62.     <% For i = 0 to RS.Fields.Count - 1 %>
  63.         <%if RS(i).Name = "PATH" or RS(i).Name="VPATH" then %>
  64.             <TD><b><a href="<%=RS(i)%>"><% = RS(i) %></a></b></TD>
  65.         <%else%>
  66.             <TD><% = RS(i) %></TD>
  67.         <%end if%>
  68.     <% Next %>
  69.     </TR>
  70.     <%
  71.     RS.MoveNext
  72.     Loop
  73. RS.Close
  74. Conn.Close
  75. %>
  76. </TABLE>
  77. <BR>
  78. <BR>
  79. <%'!--#include virtual="/ASPSamp/Samples/srcform.inc"--%>
  80.  
  81. <p>
  82. <HR WIDTH=80% ALIGN=center SIZE=3>
  83. <p>
  84.  
  85. <CENTER>
  86. <TABLE WIDTH=600 HEIGHT=50>
  87. <TR>
  88. <TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=200>
  89. <font face="Arial, Helvetica" size="1">
  90. <b>
  91. Best experienced with
  92. <br>
  93. <a href="http://www.microsoft.com/ie/ie.htm"><img src="bestwith.gif" width="88" height="31" border="0" alt="Microsoft Internet Explorer" vspace="7"></a>
  94. <br>
  95. Click here to start.
  96. </b>
  97. </font>
  98. </TD>
  99. <TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=200>
  100. <A HREF="http://www.microsoft.com/default.htm"><IMG WIDTH=175 HEIGHT=45 BORDER=0 SRC="home.gif"></A>
  101. </TD>
  102. <TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=200>
  103. <A HREF="http://www.microsoft.com/Powered/"><IMG BORDER=0 SRC="powrbybo.gif" WIDTH=114 HEIGHT=43></A>
  104. </TD>
  105. </TR>
  106. </TABLE>
  107. </CENTER>
  108.  
  109. <CENTER><I><FONT SIZE=-1>© 1996-1997 Microsoft Corporation</FONT></I></CENTER>
  110. <BR>
  111.  
  112. <CENTER>
  113.     <I><A HREF="disclaim.htm">Disclaimer</A></I>
  114. </CENTER>
  115.  
  116. </BODY>
  117. </HTML>
  118.