<% theCat = Request.Form("cat") theSearch = Request.Form("search") theLetter = Request.QueryString("index") %> <% set ypDB = Server.CreateObject("ADODB.Connection") ypDB.open "outlet-yp" if theCat <> "" or theSearch <> "" or theLetter <> "" then theSearch = "%" & theSearch & "%" if theLetter <> "" then theSearch = theLetter & "%" %> Outlook Business Search Results <% if theCat = "" then theCat = "%" else theCat = "%" & theCat & "%" if theSearch = "" then theSearch = "%" ypSearchQuery = "SELECT * FROM Company WHERE Code LIKE '" & theCat & "' AND Company LIKE '" & theSearch & "' ORDER BY Company" ypCountQuery = "SELECT COUNT(*) AS RSCount FROM Company WHERE Code LIKE '" & theCat & "' AND Company LIKE '" & theSearch & "'" set ypResults = ypDB.execute(ypSearchQuery) set ypCount = ypDB.execute(ypCountQuery) %>

Search Results: Found <% = ypCount("RSCount") %> matches


<% do while not ypResults.EOF %>

<% = ypResults("Company") %> (<% = ypResults("Description") %> - <% = ypResults("Type Of Business") %>)
Phone: <% = ypResults("Phone") %> <% if ypResults("Fax") <> "" then %> Fax: <% = ypResults("Fax") %> <% end if %>
<% if ypResults("Street") <> "" then %> Address: <% = ypResults("Street") %>, <% = ypResults("Town") %>
<% end if %> <% if ypResults("Address") <> "" then %> Mail: <% = ypResults("Address") %>, <% = ypResults("Town") %>, SK <% = ypResults("Postal") %>
<% end if %> <% if ypResults("E-mail") <> "" then %> E-mail: "><% = ypResults("E-mail") %> <% end if %> <% if ypResults("URL") <> "" then %> Web: "><% = ypResults("URL") %> <% end if %> <% ypResults.MoveNext Loop %>

<% if ypCount("RSCount") = "0" then %>

Sorry, no match.


<% end if %> <% ypQuery = "SELECT * FROM Category ORDER BY Category" set ypCategories = ypDB.Execute(ypQuery) %>

Find in


Alphabetical Listings
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


<% else %> Outlook Business Search <% ypQuery = "SELECT * FROM Category ORDER BY Category" set ypCategories = ypDB.Execute(ypQuery) %>

Outlook Business Search



Find in

Tip: Leave the search field blank to get all entries in a category.

Alphabetical Listings
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


<% End If %>

Return to Outlet Internet