<% 'HIT COUNTER 'Dimension variables Dim adoCon 'Holds the Database Connection Object Dim rsAccess 'Holds the recordset for the new record to be added to the database Dim strSQL 'Holds the SQL query for the database Dim counter 'Holds counter value from database Dim strCurrentPage 'Holds name of current web page strCurrentPage = "Index" 'Create an ADO connection odject Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("_private/Hits.mdb") 'Create an ADO recordset object Set rsAccess = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database strSQL = "SELECT tblHits.Index, tblHits.Advertising, tblHits.Classifieds, tblHits.Commercial_Advertising, tblHits.Contact, tblHits.Contests, tblHits.Coupons, tblHits.Employment, tblHits.Events, tblHits.Fun_Links, tblHits.KIQX, tblHits.KIUP, tblHits.KKDC, tblHits.KRSJ, tblHits.Listen_Live, tblHits.Loyal_Listener_Registry, tblHits.News, tblHits.PSA, tblHits.Sports, tblHits.Weather FROM tblHits;" 'Set the cursor type we are using so we can navigate through the recordset rsAccess.CursorType = 2 'Set the lock type so that the record is locked by ADO when it is updated rsAccess.LockType = 3 'Open the tblComments table using the SQL query held in the strSQL varaiable rsAccess.Open strSQL, adoCon Set counter = rsAccess(strCurrentPage) counter = counter + 1 rsAccess.Fields(strCurrentPage) = counter rsAccess.Update adoCon.Close %> Index
Home Page
News Page
Chamber Chat, FYI, LaPlata County Update,Newscast & Specials
Weather
Contests
Sports
Advertising
photoalbums
Fun Links
Employment with FCB
Advertise with FCB
Contact Us

Copyright

 

 

Upcoming Events

Lyle Lovett In Concert
July 27, 2009
Ray Dennison Field
Fort Lewis College

Three Ways To Win
Tickets To
Music In The
Mountain
s

 

Register as A Frequest Listener Listen Live
Fear the Hawk

FLC Listen Live

Colorado Rockies
Live On
KIUP Sports Stop 930
Advertise with The Colorado Rockies

Want Tickets to
Music In The Mountain Contests

 

Lyle Lovett Contests

Lyle Lovett

Coming To Ray Dennison Field
July 27,2009