%
Dim adoJournalCon 'Database Connection Variable
Dim strJournalCon 'Holds the Database driver and the path and name of the database
Dim strJournalSQL 'Holds the SQL query for the database
Dim rsJournalRecordsConfiguration 'Holds the configuartion recordset
Dim rsJournalRecords 'Database recordset holding the Journal items
Dim rsJournalCommentsCount 'Database recordset holding the number of comments for a Journal Item
Dim intJournalItems 'Loop counter for displaying the Journal items
Dim strJournalBgColour 'Holds the background colour of the Journal
Dim strJournalTextColour 'Holds the text colour of the Journal
Dim strJournalTextType 'Holds the font type of the Journal
Dim intJournalHeadingTextSize 'Holds the heading font size
Dim intJournalTextSize 'Holds the font size of the Journal
Dim intJournalSmallTextSize 'Holds the small font size
Dim strJournalLinkColour 'Holds the link colour of the Journal
Dim strJournalTableColour 'Holds the table colour
Dim strJournalTableBorderColour 'Holds the table border colour
Dim strJournalTableTitleColour 'Holds the table title colour
Dim strJournalVisitedLinkColour 'Holds the visited link colour of the Journal
Dim strJournalActiveLinkColour 'Holds the active link colour of the Journal
Dim blnJournalLCode 'set to true
Dim intJournalPreviewItems 'Holds the number of preview journal items to display
'Create database connection
'Create a connection odject
Set adoJournalCon = Server.CreateObject("ADODB.Connection")
'------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below --------------
'Database connection info and driver
strJournalCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("journal/journal.mdb")
'Database driver info for Brinkster
'strJournalCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/site_journal.mdb") 'This one is for Brinkster users place your Brinster username where you see USERNAME
'Alternative OLE drivers faster than the basic one above
'strJournalCon = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath("site_journal.mdb") 'This one is if you convert the database to Access 97
'strJournalCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("site_journal.mdb") 'This one is for Access 2000/2002
'If you wish to use DSN then comment out the driver above and uncomment the line below (DSN is slower than the above drivers)
'strJournalCon = "DSN = DSN_NAME" 'Place the DSN where you see DSN_NAME
'---------------------------------------------------------------------------------------------------------------------------------------------
'Set an active connection to the Connection object
adoJournalCon.Open strJournalCon
'Read in the configuration for the script
'Intialise the ADO recordset object
Set rsJournalRecordsConfiguration = Server.CreateObject("ADODB.Recordset")
'Initialise the SQL variable with an SQL statement to get the configuration details from the database
strJournalSQL = "SELECT tblConfiguration.* From tblConfiguration;"
'Query the database
rsJournalRecordsConfiguration.Open strJournalSQL, strJournalCon
'If there is config deatils in the recordset then read them in
If NOT rsJournalRecordsConfiguration.EOF Then
'Read in the configuration details from the recordset
strJournalBgColour = rsJournalRecordsConfiguration("bg_colour")
strJournalTextColour = rsJournalRecordsConfiguration("text_colour")
strJournalTextType = rsJournalRecordsConfiguration("text_type")
intJournalHeadingTextSize = CInt(rsJournalRecordsConfiguration("heading_text_size"))
intJournalTextSize = CInt(rsJournalRecordsConfiguration("text_size"))
intJournalSmallTextSize = CInt(rsJournalRecordsConfiguration("small_text_size"))
strJournalTableColour = rsJournalRecordsConfiguration("table_colour")
strJournalTableBorderColour = rsJournalRecordsConfiguration("table_border_colour")
strJournalTableTitleColour = rsJournalRecordsConfiguration("table_title_colour")
strJournalLinkColour = rsJournalRecordsConfiguration("links_colour")
strJournalVisitedLinkColour = rsJournalRecordsConfiguration("visited_links_colour")
strJournalActiveLinkColour = rsJournalRecordsConfiguration("active_links_colour")
blnJournalLCode = CBool(rsJournalRecordsConfiguration("Code"))
intJournalPreviewItems = rsJournalRecordsConfiguration("No_of_preview_items")
End If
'Reset server object
rsJournalRecordsConfiguration.Close
Set rsJournalRecordsConfiguration = Nothing
%>