-
Help with text file
I am doing a project and i want to have a text file with usernames and passwords like
john 12345
nick 56780
taki 9087
and i will put a login form so the user will type the username and password and through the text file, the program will check the information and then login. So i want some help how to write the code to check this information when the user type them.
-
Have a look at this thread.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
You will be able to hard-code the file name and location. I'd suggest that you load the file only once for each session - the first time someone logs in - and that you read the data into a map/dictionary collection with the key being whatever "public" information you have. I would write file loading method using a Scanner object because of the datatype checking and flexibility of the methods exposed by the class. If this is a new user, and the data meets your requirements, you would write to the collection in memory, then write the collection to disk to save the file each time a new registration is completed or as the session ends. It might be helpful - if you are up for it - to use the NIO routines and open a channel which would help synchronize the data in memory and in your file stored on more permanent storage.
Similar Threads
-
By jase_dukerider in forum C++
Replies: 2
Last Post: 04-14-2005, 07:48 PM
-
By Larry Rebich in forum vb.announcements
Replies: 1
Last Post: 04-02-2002, 10:45 PM
-
Replies: 3
Last Post: 08-30-2001, 11:45 AM
-
By Tomer Cagan in forum ASP.NET
Replies: 1
Last Post: 07-24-2001, 09:01 AM
-
By deborah in forum authorevents.kurata
Replies: 0
Last Post: 04-17-2000, 01:33 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks