<% '' OFFICE 'Function OpenDB() ' Dim cnDB ' As ADODB.Connection ' Set cnDB = Server.CreateObject("ADODB.Connection") ' cnDB.ConnectionString = _ ' "Provider=Microsoft.Jet.OLEDB.4.0;" _ ' & "Data Source=c:\Inetpub\wwwroot\icatholiczone\fpdb\Events.mdb" ' cnDB.Open ' Set OpenDB = cnDB 'End Function ''WEBSITE Function OpenDB() Dim cnDB ' As ADODB.Connection Set cnDB = Server.CreateObject("ADODB.Connection") cnDB.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=/services/webpages/i/c/icatholiczone.com/fpdb/school.mdb" cnDB.Open Set OpenDB = cnDB End Function '' HOME 'Function OpenDB() ' Dim cnDB ' As ADODB.Connection ' Set cnDB = Server.CreateObject("ADODB.Connection") ' cnDB.ConnectionString = _ ' "Provider=Microsoft.Jet.OLEDB.4.0;" _ ' & "Data Source=c:\Webshare\wwwroot\icatholiczone\fpdb\Events.mdb" ' cnDB.Open ' Set OpenDB = cnDB 'End Function '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' Sub Main ' ' Processing for this page starts in this routine. It ' contains a dispatcher to call the appropriate routine, ' based on what function was needed. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Main Dim cnDB ' As ADODB.Connection Set cnDB = OpenDB() Retrieve(cnDB) cnDB.Close End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Sub Retrieve ' ' This routine lists all records of this data type. It ' also provides actions to create, retrieve, update, and ' delete records. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub Retrieve(cnDB) Dim rsData ' As ADODB.Recordset Dim strURL ' As String Dim strSQL ' As String StrSQL="SELECT * FROM News WHERE (((News.StartDate) Between (Now()-1) And (Now()+15)) OR ((News.EndDate) Between (Now()) And (Now()+30))) ORDER BY News.StartDate, News.EndDate" Set rsData = cnDB.Execute(strSQL) 'PrintHeader "What's Happening" Do Until rsData.EOF WriteLine "

" & rsData("Headline") & "


" WriteLine "

" & rsData("Body") & "

" 'WriteLine "

Committee: " & rsData("Submittedby") & "

" 'WriteLine "

Submitted On: " & rsData("SubmittedDate") & "

" WriteLine "

Effective Date: " & rsData("StartDate") & " to " & _ rsData("EndDate") & "

" WriteLine "
" rsData.MoveNext Loop rsData.Close WriteLine "

" & "New Announcements may be sent to School Announcements" & "

" ' WriteLine "" End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Sub CloseDB ' ' This routine closes the database connection and clears ' the object reference. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub CloseDB(cnDB) cnDB.Close Set cnDB = Nothing End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Sub WriteLine ' ' This routine prints a line of HTML to the browser and ' includes a carriage return/line feed at the end of the ' line. That cleans up the HTML output for debugging ' purposes. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub WriteLine(strData) Response.Write strData & vbCrLF End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Sub WriteComment ' ' This routine prints a comment into the HTML output. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub WriteComment(strData) WriteLine "" End Sub %> View the Current News

Support our School Activities

<% Call Main %>