By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Help with Login form that validates users and passwords from text files(VB 2005)

P: 1
i have to create a login form that validates the users and passwords from a text file. I have another function that can add new users and passwords by writing to a test file split by a delimiter. But i dont know how to read from the text file and validates one user one by one when i key in in the login form. the example format of the text file:
hunter|007...left is the username and password is on the right. i dont need sql coding , i just need vb code that is as simple as possible because i really suck at vb.really appreciate it if someone can help me. Thanks!
Jan 19 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
Just open the file, and start reading line by line. Use the Split() function to split each line into userid and password, then compare them to the values the user has entered.

Remember when people are creating a userid or password, don't let them include a "|" character or Split() will screw up.
Jan 21 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.