% Option Explicit ' ' declare the variables to use ' DIM Firsttime, Emptyfield, errtext Dim Query, Connect, man_rs, Place Dim Command, maxvar, i ,n, testvar,maxn,newvar Dim workvar(99), c Dim skipvar(99) Dim errarray(99) Dim WhereClause, Item Dim NoResults ' 'set the variables required in the program ' maxvar = 2 ' errarray(1) = "Choose an option" for i = 1 to maxvar skipvar(i) = 0 workvar(i) = "" next Firsttime = 1 : Emptyfield = 0 for i = 1 to maxvar testvar = Request("work"&i) if testvar = "" then if skipvar(i) = 0 then Emptyfield = i if errtext = "" then errtext = errarray(i) end if else Firsttime = 0 end if workvar(i) = testvar next %>
Go Local Northwest : Leisure
Powered by e-manumit.com<% if Firsttime = 1 or Emptyfield <> 0 Then %><%if emptyfield <> 0 and firsttime = 0 then %> ---<%= errtext%> <% end if %>
<% Else %> <% for i = 1 to maxvar newvar = "" testvar = Request("work" & i) maxn = len(testvar) for n = 1 to maxn c=mid(testvar,n,1) if c = "," then c = "" if c = "'" then c = "" if c = "+" then c = "" if c = "&" then c = " " if c = "%" then c = "" newvar = newvar & c next workvar(i) = newvar next Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open "buscomm" ' Get the form information in local variables Query = "SELECT dbdata10, dbdata1, dbdata6, dbdata2, dbdata7, dbdata5 FROM master " Query = Query & " WHERE dbdata3 = 'LEISURE' " if workvar(1) <> "ALL" then Query = Query & " AND dbdata4 = '" & workvar(1) & "' " end if if workvar(2) <> "ALL" then Query = Query & " AND dbdata8 = '" & workvar(2) & "' " end if Set Command = Connect.Execute(Query) %>Here are your selections for : <%=workvar(1)%>
| Company | Contact | Services |
| <%=Command("dbdata6")%> |
"><%=Command("dbdata10") %> |
<%=Command("dbdata7")%> |
<% end if %>