Good Morning Vineeth1311
yes lets say i have a Table called timelogging defined like this
Create table timelogging
(
ID int identity(100,01) Primary key not null ,
Username varchar(20) null,
LoginTime DateTime null,
LogoutTime DateTime null
)
in this Case when the User logs in you will insert a new Record and like this
insert into timelogging (Username,LoginTime)
values (@Username,GetDate())
and when the user Closes the Application by logging out , now you don't insert a new record but you Update a Field "LogoutTime like this
Update timelogging
set LogoutTime =Getdate()
where Username = @Username
Thank you Again For Posting at Dotnetfunda
Vuyiswa Maseko
Thank you for posting at Dotnetfunda
[Administrator]
Vineeth1311, if this helps please login to Mark As Answer. |
Reply | Alert Moderator