|
<%
'variables Decleared
Dim intOldCount ' count variable
Dim intNewCount ' count variable
Dim oConn
Dim oRS
If IsEmpty(Session("TotalCount")) Then
Call CountUser
End If
Sub CountUser()
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString = "DSN=pmdoc1_ncbp"
oConn.Open
Set oRS = Server.CreateObject("ADODB.Recordset")
oRs.Open "visitors",oConn, 0,3,2
If Not oRS.EOF Then
intoldCount = oRS("count").Value
Else
intoldCount = 0
End If
intNewCount = intOldCount + 1
Session("TotalCount")= intNewCount
Response.write("You Are Visitor :")
Response.write(" ")
Response.write(Session("TotalCount"))
oRS.MoveFirst
oRS("count")=intNewCount
oRS.Update
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
End Sub
%>
|
|