<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% 'Get form results strCompanyName = Request("cmbCommunity") strCategoryName = Request("cmbCategories") strKeywords = Request("txtKeywords") strSearchType = Request("keysearchtype") Dim strSQL strSQL = "SELECT DISTINCT Community.Company" strSQL = strSQL & " FROM Community" strSQL = strSQL & " WHERE Community.Inactive <> 1" strSQL = strSQL & " ORDER BY Community.Company ASC" Set rsCommunity = Server.CreateObject( "ADODB.Recordset" ) Set rsCommunity = con.execute(strSQL) strSQL = "SELECT DISTINCT Community.Category" strSQL = strSQL & " FROM Community" strSQL = strSQL & " ORDER BY Community.Category ASC" Set rsCategories = Server.CreateObject( "ADODB.Recordset" ) Set rsCategories = con.execute(strSQL) %> Brockville Public Library

Community Resource Database

Looking for information on local community services?

The Brockville Public Library Community Resource Database is a free, online directory of health, human service, education agencies and programs in Brockville and the surrounding area and includes services for children, teens, adults, families, and seniors. With detailed information on over 200 community resources, the BPLCRD provides instant, keyword access to essential information for Brockville individuals, organizations and visitors.

The CRD reaches people wherever computers linked to the Internet are available, wherever people can benefit from its use – in their homes, in their workplace, in community agencies, schools, and libraries. The BPLCRD is current, with information added and updated regularly.

If your organization is not listed, or you have more current details, please contact amanda@brockvillelibrary.ca. We would love to hear from you.

**DO NOT USE "BROCKVILLE" IN YOUR KEYWORD SEARCH**

Organization/Business Search

Category Search

Keyword Search *Separate multiple keywords with a space.

"AND") then Response.Write("checked='checked'") end if %> /> Search for records that contain ANY of the listed keywords
/> Seach for records that only contain ALL of the listed keywords
<% IF (strCompanyName <> "") OR (strCategoryName <> "") OR (strKeywords <> "") THEN IF (strCompanyName <> "") THEN strWhereClause = "Community.Company = '" & strCompanyName & "'" ELSEIF (strCategoryName <> "") THEN strWhereClause = "Community.Category = '" & strCategoryName & "'" ELSE 'split keywords up keyword_array=split(strKeywords," ") 'add leading and trailing space to searchtype (OR/AND) strSearchType = " " & strSearchType & " " 'loop to cycle through array FOR i=0 to UBound(keyword_array) 'Response.Write(i) IF (i <> 0) THEN strWhereClause = strWhereClause & strSearchType END IF strWhereClause = strWhereClause & "(Community.Keywords LIKE '%" & keyword_array(i) & "%' OR Community.Company LIKE '%" & keyword_array(i) & "%' OR Community.Category LIKE '%" & keyword_array(i) & "%')" NEXT END IF 'Response.Write(strWhereClause) strSQL = "SELECT Community.Company, Community.Address1, Community.Address2, Community.City, Community.Province," strSQL = strSQL & " Community.PostalCode, Community.Telephone, Community.TollFree," strSQL = strSQL & " Community.Fax, Community.Website, Community.Category," strSQL = strSQL & " Community.Description, Community.Contact,Community.Email" strSQL = strSQL & " FROM Community" strSQL = strSQL & " WHERE " & strWhereClause & " AND Inactive <> 1" strSQL = strSQL & " ORDER BY Community.Category ASC, Community.Company ASC" Set rsResult = Server.CreateObject( "ADODB.Recordset" ) Set rsResult = con.execute(strSQL) IF (NOT rsResult.EOF) THEN strOldCategory = "" Do Until rsResult.EOF 'Create website url if website address is present strURL = "" strWebsite = rsResult("Website") IF strWebsite <> "" AND Ucase(strWebsite) <> "N/A" THEN IF (InStr(strWebsite,"http://") = 0) THEN strWebsite = "http://" & strWebsite END IF strURL = ""&strWebsite&"" ELSE strURL = " " END IF 'Create mailto if email address is present strEmail = rsResult("Email") IF (InStr(strEmail,"@") >= 1) THEN strEmail = ""&strEmail&"" ELSE strEmail = " " END IF 'check if there is a second address line strAddress2 = rsResult("Address2") IF (strAddress2 <> "") AND NOT ISNULL(strAddress2) THEN strAddress2 = strAddress2 & "
" END IF 'fix characters with quotation marks or apostrophes strBusinessName = rsResult("Company") IF (strBusinessName <> "") AND NOT ISNULL(strBusinessName) THEN strBusinessName = Server.HTMLEncode(strBusinessName) END IF 'fix characters with quotation marks or apostrophes strDescription = rsResult("Description") IF (strDescription <> "") AND NOT ISNULL(strDescription) THEN strDescription = Server.HTMLEncode(strDescription) END IF 'fix characters with quotation marks or apostrophes strContact = rsResult("Contact") IF (strContact <> "") AND NOT ISNULL(strContact) THEN strContact = Server.HTMLEncode(strContact) END IF 'print category headers strCurrentCategory = TRIM(rsResult("Category")) IF strCurrentCategory = "" OR ISNULL(strCurrentCategory) THEN strCurrentCategory = "Uncategorized" END IF 'get category and compare to last category IF strOldCategory <> strCurrentCategory THEN 'set current category strOldCategory = strCurrentCategory 'print category header %>
<%=strCurrentCategory%>
<% END IF %>
<%=strBusinessName%>
<%=strDescription%>
Website:<%=strURL%>
Address:<%=rsResult("Address1")%>
<%=strAddress2%> <%=rsResult("City")%>, <%=rsResult("Province")%>
<%=rsResult("PostalCode")%>
Telephone:<%=rsResult("Telephone")%>
Toll Free:<%=rsResult("TollFree")%>
Fax:<%=rsResult("Fax")%>
Contact:<%=strContact%>
Email:<%=strEmail%>
<% rsResult.MoveNext Loop ELSE %> No results found. <% END IF rsResult.Close Set rsResult = Nothing END IF %>
Accredited Ontario Public Library

Funding Assistance provided by Industry Canada
(Community Access Program), Ministry of Culture and Recreation