How to log user activites while using my program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • diego

    #1

    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_Gene ral_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

  • Newbie Coder

    #2
    Re: How to log user activites while using my program

    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)


    Comment

    • lord.zoltar@gmail.com

      #3
      Re: How to log user activites while using my program

      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.

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: How to log user activites while using my program

        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" <diegobph@yahoo .comschreef in bericht
        news:1169533401 .547513.163360@ l53g2000cwa.goo glegroups.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_Gene ral_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
        >

        Comment

        • diego

          #5
          Re: How to log user activites while using my program

          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.comwr ote:
          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_Gene ral_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

          Comment

          Working...