How to log user activites while using my program

D

diego

Hi everyone,

What is an effective way of storing user activites while using my
program? Like when a user clicks on a button, i would like ro save the
following in a log file, "Clicked Edit button.".

But my concern is, if I store the table in SQL Server, then my database
would increase its size in no time (program will be used by more than
50 stations.), not to mention the network traffic it would cause, as
almost all user activities will be written to the log table.

I have also considered using an MS Access table stored in each
workstation and save the log table there but from what I ahve read
about MS Access tables, it can only store up to 2 GB of data.

Table structure would be like the ff:

CREATE TABLE [AuditTrail] (
[ActivityID] [int] IDENTITY (1, 1) NOT NULL ,
[Activity] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ActivityDate] AS (getdate()) ,
[UserID] [smallint] NOT NULL , -- program user id assigned to each
user
[WorkstationID] [varchar] (20) , -- COMPUTER NAME
[WindowsUserID] [varchar] (20) -- WINDOWS USER NAME
) ON [PRIMARY]

Has anybody done anything similar to this.

Thank in advance.

Diego
 
N

Newbie Coder

I don't see any point of your application

What on earth would you need something pointless like that?

Newbie Coder
(It's just a name)
 
L

lord.zoltar

Have you thought of writing to a log file? It would be quicker than
sending to the database everytime there is an action.
If you still want to use a database to store all the information, you
could send the data in the log file when the computer is idling.
I'd question whether it's necessary to track every user action, but
without knowing more about the situation I can't really say.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top