Solved

code Log in history using VB?

Posted on 2002-03-30
7
186 Views
Last Modified: 2010-05-02
hello, i have no idea how do u create a log book using visual basic. Do you use looping and calculations? See, the question i have in mind is how to create a log book in visual basic where whenever a user enters into lets say your program in VB, this prg will record the time the user logs in, and this user is loggin in by using what ID. (meaning it's kept in a database) and later if the database administrator wants t print out the report, the prograM Should be able to print it out?

how do i code that? i'm totally at lost right now.
0
Comment
Question by:pohleen
7 Comments
 
LVL 4

Accepted Solution

by:
Steve Sirica earned 200 total points
ID: 6906860
At 1st glace this sound as simple as just writing to a file?  I may be over simplifying, and excuse me if I am, but just use one of the methods to wite info out to a file.  I would use the FileSystemObject.  I'm sure I'm going to catch slack for that suggestion.
0
 
LVL 1

Expert Comment

by:alaplume
ID: 6907856
Even if users don't have to log in to your app you can't find out who is logged into the machine using an API. Then you simply write a record to you log table using the username, datetime etc...
0
 
LVL 4

Expert Comment

by:escheider
ID: 6907888
Here is a good reference on creating logfiles using VB:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q161306

It explains how to create the logging mechanism and utilize it.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:pohleen
ID: 6908984
anybody can code this will deserve 200 points.i know it isn't much but it's all i could afford... i'm kinda in a deep mess now coz time is the biggest prob....thanks...
0
 
LVL 4

Expert Comment

by:Steve Sirica
ID: 6910058
Once again I may be over simplifying, but a log file is nothing more than a text with a .log extension.  Here is some simple code to write out a text/log file.

Dim FSO         As Object
Dim fsoTS       As Object

Set FSO = CreateObject("Scripting.FileSystemObject")
Set fsoTS = FSO.OpenTextFile("c:\test.log", 8, True)

fsoTS.WriteLine "write out log info here."

fsoTS.Close

This is what I use and it works fine for me.

Good luck.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7637984
Hi pohleen,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept SSirica's comment(s) as an answer.

pohleen, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7754887
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question