Help with text file
I am doing a project and i want to have a text file with usernames and passwords like
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.
By jase_dukerider in forum C++
Last Post: 04-14-2005, 08:48 PM
By Larry Rebich in forum vb.announcements
Last Post: 04-02-2002, 11:45 PM
Last Post: 08-30-2001, 12:45 PM
By Tomer Cagan in forum ASP.NET
Last Post: 07-24-2001, 10:01 AM
By deborah in forum authorevents.kurata
Last Post: 04-17-2000, 02:33 PM
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