473,503 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System to record when an employee logs into their PC using VB.Net and SQL Database

Hello

I hope this is posted in the correct place, if not the can some point
me in the direction of a suitable Google group.

ok, here's my problem......

When an employee logs into their PC, we want to record the "log in"
time and then the "log off" time at the end of the day and record the
two times in a SQL Database. This is for the purpose of working out
the total hours worked by an employee as we are trailing an flexi-time
system and need to know when someone comes in to work.

I would like to use VB.Net to program such a system but at a bit of a
loss as to...

1/ how to get the employee's username from the PC
2/ how to put the employee's username into the DB

any help or pointers to websites that might help would be grand

cheers

Andrew

Nov 1 '07 #1
7 2297
1/ how to get the employee's username from the PC

Environment.UserName
2/ how to put the employee's username into the DB
SqlConnection, SqlCommand

Thanks,

Seth Rowe

Nov 1 '07 #2
andrewCMF <an****************@checkmyfile.comwrote in
news:11**********************@57g2000hsv.googlegro ups.com:
Hello

I hope this is posted in the correct place, if not the can some point
me in the direction of a suitable Google group.

ok, here's my problem......

When an employee logs into their PC, we want to record the "log in"
time and then the "log off" time at the end of the day and record the
two times in a SQL Database. This is for the purpose of working out
the total hours worked by an employee as we are trailing an flexi-time
system and need to know when someone comes in to work.
Are you on an Active Directory?

Nov 1 '07 #3
Pointer: I rarely log off my machine, but rather leave it logged in
overnight, everynight. I shut down Friday nights. This is necessary for
pushed updates, backups, etc.

"andrewCMF" wrote:
Hello

I hope this is posted in the correct place, if not the can some point
me in the direction of a suitable Google group.

ok, here's my problem......

When an employee logs into their PC, we want to record the "log in"
time and then the "log off" time at the end of the day and record the
two times in a SQL Database. This is for the purpose of working out
the total hours worked by an employee as we are trailing an flexi-time
system and need to know when someone comes in to work.

I would like to use VB.Net to program such a system but at a bit of a
loss as to...

1/ how to get the employee's username from the PC
2/ how to put the employee's username into the DB

any help or pointers to websites that might help would be grand

cheers

Andrew

Nov 1 '07 #4
Hello

Seth Rowe - Thanks for you reply, Ta.

Spam Catcher - yes we do use active directory. we are running sbs2000
(upgarding to sbs2003 in the not to distant future). Is there
something in there that we can use to log the time an employee logs in
and off?

cheers

Andrew
Nov 1 '07 #5
Hi Family tree Mike,

Thanks for the pointer, it is a valid point however all our employee's
know to log off at night for security reasons, although they due leave
PCs on for updates as you mentioned.

cheers

Andrew

Nov 1 '07 #6
andrewCMF <an****************@checkmyfile.comwrote in
news:11*********************@d55g2000hsg.googlegro ups.com:
Spam Catcher - yes we do use active directory. we are running sbs2000
(upgarding to sbs2003 in the not to distant future). Is there
something in there that we can use to log the time an employee logs in
and off?
Yes, LogOn/LogOff Auditing is built into Windows/ActiveDirectory:

http://technet.microsoft.com/en-us/l.../Bb742436.aspx

You'll then need an EventLog reporting program to generate fancy reports.
Or you can build a service to read the event log and dump the records to a
database.

This method should be more reliable than building a client application as
you're relying on the server's authentication process and everything is
located on your central servers.

Here's some quick code on how to read the event logs:

http://www.freevbcode.com/ShowCode.asp?ID=5658
Nov 1 '07 #7
Hi,

excellent - thanks for this!! just the ticket!

ta

Andrew

Nov 1 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3843
by: Jim in Arizona | last post by:
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure...
10
3210
by: Vavel | last post by:
Hi all! I want to insert the record into the table by using an application program that includes the following statements: EXEC SQL BEGIN DECLARE SECTION; long hvInt_Stor; long hvExt_Stor;...
6
1738
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
8
2098
by: Richard Sherratt | last post by:
It's a database keeping info about people and is expected to contain 20,000 to 25,000 people. I could put a GoToPerson Combo on the form, but the customer and I are not to keen on that. It makes...
2
15229
by: Ron St-Pierre | last post by:
We're developing a java app and are using postgres as the database. On our dev server I started the app, closed it, but the java process was still open so I killed it, which caused the above error....
7
3040
by: Stephen Poley | last post by:
I have the following situation: - a table of employees, keyed on employee-id; - a table of training sessions, keyed on session-id; - a requirement to log who was present at which session, plus...
6
6245
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET...
3
1756
by: veerapureddy | last post by:
Hai everybody, i like to insert some records into database from html form by entering data.my problem is how can i check , whether a record is available in database about a particular...
8
3351
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.