<% ' Define our connection object dim strConn, cxn, rst dim mdbPath dim strInsert, strUpdate, strSelect ' initial connection info mdbpath=Server.MapPath("/toronto/mdb/ncuto.mdb") strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mdbPath strSelect="select * from info where (info_type like '1%') and (active='Y' or " &_ " start_date >= #" & now() & "# ) order by start_date, city" ' get connection set cxn = Server.CreateObject("ADODB.Connection") cxn.CommandTimeout = 15 cxn.ConnectionTimeout = 30 cxn.Open strConn ' execute query Set rst = cxn.Execute (strSelect, , adCmdText) do while not rst.EOF newsDate = rst.fields("start_date").value newsTitle = rst.fields("title").value newsSummary = rst.fields("summary").value newsLink = rst.fields("link").value detail = rst.fields("detail").value %> <% ' move to the next record rst.MoveNext loop ' release db resource rst.Close cxn.Close Set rst = nothing Set cxn = nothing %> <% ' initial query info strSelect="select * from info where (info_type like '2%') and (active='Y' or " &_ " start_date >= #" & now() & "# ) order by start_date, city" ' get connection set cxn = Server.CreateObject("ADODB.Connection") cxn.CommandTimeout = 15 cxn.ConnectionTimeout = 30 cxn.Open strConn ' execute query Set rst = cxn.Execute (strSelect, , adCmdText) total = 0 do while not rst.EOF newsDate = rst.fields("start_date").value newsTitle = rst.fields("title").value newsSummary = rst.fields("summary").value newsLink = rst.fields("link").value detail = rst.fields("detail").value total = total + 1 %> <% ' move to the next record rst.MoveNext loop ' release db resource rst.Close cxn.Close Set rst = nothing Set cxn = nothing %>
News
<%Response.Write(newsDate) %>
<%Response.Write(newsTitle) %>
<%Response.Write(newsSummary) %>
<% If (detail = "Y") Then %> more...

<% End if %>
Events
<%Response.Write(newsDate) %>
<%Response.Write(newsTitle) %>
<%Response.Write(newsSummary) %>
<% If (detail = "Y") Then %> more...

<% End if %>
What's on
Events History