|
-
May 11th, 2006, 02:50 AM
#1
Thread Starter
Junior Member
[RESOLVED] help with maintaining login information
My application is maintaining the user login info and am saving it in application specific directory.
All the login info Sucessful/Failed is been saved in a text file as per the format given below.
FORMAT:
User_Name, Login_Time, Login_Date Logout_Time Logout_Date
administrator, 12:44:16 PM, 5/11/2006
12:44:19 PM, 5/11/2006
amit, 12:44:27 PM, 5/11/2006
12:44:34 PM, 5/11/2006
Ques 1: I need to save this data in a single line i.e;
User_Name, Login_Time, Login_Date, Logout_Time Logout_Date
amit, 12:43:49 PM, 5/11/2006, 12:44:19 PM, 5/11/2006
so that it can be easily opened in excel.
The code i am using is
VB Code:
Dim strAllData As String
Dim strDataBuffer As String
'Added for capturing the logoff information
Open PWD & "/" & "log" & "/" & "loginfo.txt" For Input As #1
While Not EOF(1)
Line Input #1, strDataBuffer
strAllData = strAllData & strDataBuffer & vbCrLf
Wend
Close #1
Open PWD & "/" & "log" & "/" & "loginfo.txt" For Output As #1
Print #1, strAllData & vbCrLf & txtUserName & ", " & Time & ", " & Date
Close #1
Ques 2: I want this login info file to be read only for application users
note: my application has multiple logoff (One on almost every form in the application) buttons so i am using this code at all these places.
Thanks,
Amit
-
May 15th, 2006, 09:18 AM
#2
Thread Starter
Junior Member
Re: help with maintaining login information
Thanks guys. I think i have found the solution.
Amit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|