467,925 Members | 1,886 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

How to log user activites while using my program

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

Jan 23 '07 #1
  • viewed: 4391
Share:
4 Replies
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)
Jan 23 '07 #2
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.

Jan 23 '07 #3
Diego,

I don't know if this link will help you,

http://msdn2.microsoft.com/en-us/library/aa394564.aspx

I hope this helps,

Cor

"diego" <di******@yahoo.comschreef in bericht
news:11**********************@l53g2000cwa.googlegr oups.com...
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

Jan 23 '07 #4
Thanks for your reply.

The objective is to keep like an Audit Trail (Electronic Journal) of
all user activities while using the system. So that i know what items
were added/edited/deleted and /or processed in a particular module.
Some POS systems that i have seen have this feature, but I haven't seen
it done in a non-POS system.

Regards,

Diego
On Jan 23, 8:24 pm, Michel Posseth [MCP]
<MichelPosseth...@discussions.microsoft.comwrote :
if this is really a requirment i would still go for the SQL aproach

however i can`t inmagine a scenario where this would be usefull

regards

Michel Posseth

"diego" wrote:
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
Jan 24 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Raymond Gunawan | last post: by
3 posts views Thread by Pradeep Kumar C | last post: by
5 posts views Thread by bobwansink | last post: by
12 posts views Thread by Michael | last post: by
8 posts views Thread by simonlpwaters | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.