Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 07:31 AM
Lovely Angel For You
Guest
 
Posts: n/a
Default Record When Was Maximum Users On YOur Site !

Dear Friends
Hope you all doing great.

I made a website where I am able to record how many users are online
right now at my website ysing Session_Variables.

Now I want to record the date when I had maximum number of users
online at onetime.

Any idea how can I do that.

Waiting for your reply.

Love
Lovely

--------------------------
  #2  
Old July 19th, 2005, 07:31 AM
Ray at
Guest
 
Posts: n/a
Default Re: Record When Was Maximum Users On YOur Site !

What kind of database?

Ray at home

--
Will trade ASP help for SQL Server help


"Lovely" wrote in message[color=blue]
> I made a website where I am able to record how many users are online
> right now at my website ysing Session_Variables.
>
> Now I want to record the date when I had maximum number of users
> online at onetime.[/color]


  #3  
Old July 19th, 2005, 07:31 AM
Lovely Angel
Guest
 
Posts: n/a
Default Re: Record When Was Maximum Users On YOur Site !

Hi
I am using the following script in global.asa. This works fine and let
me know how many users are currently active on my website.

I am using Access database. It also stores total number of hits and
total new sessions also.

Any idea how to tell which date there were maximum active users.

Waiting for your replies.

Love
Lovely

--------------------------------------

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
Application("ActiveUsers")=0
End Sub

Sub Session_OnStart
Application.lock
Application("ActiveUsers") = Application("ActiveUsers") + 1
Application.unlock

End Sub

Sub Session_OnEnd
Application.lock
Application("ActiveUsers") = Application("ActiveUsers") - 1
Application.unlock
End Sub
</SCRIPT>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4  
Old July 19th, 2005, 07:31 AM
William Tasso
Guest
 
Posts: n/a
Default Re: Record When Was Maximum Users On YOur Site !

Ray at <%=sLocation%> wrote:[color=blue]
> "Lovely" wrote in message[color=green]
>> I made a website where I am able to record how many users are online
>> right now at my website ysing Session_Variables.
>>
>> Now I want to record the date when I had maximum number of users
>> online at onetime.[/color][/color]
[color=blue]
> What kind of database?
>[/color]

I think that was the o/p question - sort of ;o)

--
William Tasso - http://WilliamTasso.com


  #5  
Old July 19th, 2005, 07:31 AM
Ray at
Guest
 
Posts: n/a
Default Re: Record When Was Maximum Users On YOur Site !

If you have a table that just has this:

TableName: AppCount

MaxCount (Number)
TimeLog (Date/Time)


You could do:

Sub Application_OnStart
Application("ActiveUsers")=0
End Sub

Sub Session_OnStart
Application.lock
iAppCount = Application("ActiveUsers") + 1
Application("ActiveUsers") = iAppCount
objYourADOConnectionToYourAccessDatabase.Execute "UPDATE [AppCount] SET
[MaxCount]=" & iAppCount & ",TimeLog=#" & Now() & "# WHERE " & iAppCount &
">[MaxCount]"
Application.unlock

End Sub


That will execute a query on every new session, and if the new value is
higher than the current value stored in the DB, it will update the record.
Otherwise, it will find no records to update.

Ray at home


--
Will trade ASP help for SQL Server help


"Lovely Angel" <lovely_angel_for_you@yahoo.com> wrote in message
news:OdiYLs2XDHA.2572@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi
> I am using the following script in global.asa. This works fine and let
> me know how many users are currently active on my website.
>
> I am using Access database. It also stores total number of hits and
> total new sessions also.
>
> Any idea how to tell which date there were maximum active users.
>
> Waiting for your replies.
>
> Love
> Lovely
>
> --------------------------------------
>
> <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
> Sub Application_OnStart
> Application("ActiveUsers")=0
> End Sub
>
> Sub Session_OnStart
> Application.lock
> Application("ActiveUsers") = Application("ActiveUsers") + 1
> Application.unlock
>
> End Sub
>
> Sub Session_OnEnd
> Application.lock
> Application("ActiveUsers") = Application("ActiveUsers") - 1
> Application.unlock
> End Sub
> </SCRIPT>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it![/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles