% '' 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") & "
" & rsData("Body") & "
" 'WriteLine "Committee: " & rsData("Submittedby") & "
" 'WriteLine "Submitted On: " & rsData("SubmittedDate") & "
" WriteLine "Effective Date: " & rsData("StartDate") & " to " & _ rsData("EndDate") & "
" WriteLine "" & "New Announcements may be sent to School Announcements" & "
" ' WriteLine "