Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact






YOUR HIT COUNTER IN ASP
I will in this tutorial show you how to make a hit counter, using a Accsess database.



Making the Hit-counter

When a user enters your site, you have to update the table in your database. I have called my table for tbHits and the database for dbHits. The table has a column that register viewers called: viewers.If you are not familiar to the connect functions or the SQL statements, this tutotrial will show you the basics.

//connecting to the db
Dim objConn, viewers
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
          "Data Source=" & Server.Mappath("dbHits.mdb") & ";"

strSQL = "SELECT * FROM tbHits"

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn,2,2

viewers = objRS.fields("viewers") + 1

strSQL = "UPDATE tbHits SET viewers = '"& viewers &"' "

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn,2,2

Response.Write(viewers)




Download Source for the counter and db.

PROJECT DESCRIPTION
Category Programming with ASP
Author Tommy Johannessen





Ronny André Reierstad
Morrowland All rights reserved Morrowland © 2002 Apron Tutorials

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2007  
Ronny André Reierstad