Simple SQL Search Results |
<%' !--#INCLUDE VIRTUAL="/iissamples/issamples/ADOVBS.INC"--%> <% QueryForm = "/iissamples/issamples/sqlqhit.htm" Set Conn = Server.CreateObject("ADODB.Connection") Conn.ConnectionString = "provider=msidxs;" Conn.Open Set AdoCommand = Server.CreateObject("ADODB.Command") set AdoCommand.ActiveConnection = Conn %> Executing the following query: <% if Request.QueryString("CiRestriction")="" then %> <% if Request.QueryString("CiOrderBy")="" then %> <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" from " &Request.QueryString("CiScope") %> <% else %> <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" FROM " &Request.QueryString("CiScope")&" ORDER BY " &Request.QueryString("CiOrderBy") %> <% end if %> <% else %> <% if Request.QueryString("CiOrderBy")="" then %> <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" from " &Request.QueryString("CiScope")&" where "&Request.QueryString("CiRestriction") %> <% else %> <% AdoCommand.CommandText = "Select "&Request.QueryString("CiColumns")&" FROM " &Request.QueryString("CiScope")&" WHERE "&Request.QueryString("CiRestriction")&" ORDER BY " &Request.QueryString("CiOrderBy") %> <% end if %> <% end if%>
<%=AdoCommand.CommandText%> <% Set RS = Server.CreateObject("ADODB.RecordSet") AdoCommand.Properties("Bookmarkable") = True RS.CursorType = adOpenKeyset RS.MaxRecords = 300 RS.open AdoCommand CiSearchString = CStr(RS.Properties("Query Restriction")) %>
<% = RS(i).Name %> | <% Next %>||||
---|---|---|---|---|
| <% = RS(i) %> | <%end if%> <%else%><% = RS(i) %> | <%end if%> <% Next %>