3 Replies - 1150 Views - Last Post: 21 December 2011 - 08:31 PM Rate Topic: -----

#1 cbenjafield  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 21-December 11

VB.NET login using text file

Posted 21 December 2011 - 06:07 PM

I have a text file that is laid out like this:

user1,pass1,staff,0,
user2,pass2,student,50,

I have created a login system using that text file that involves the contents being imported into an array split by a comma.

I need the people to be able to change their passwords without affecting the other lines but have no idea how to get it done. I have tried myself but it is hopeless.
Is This A Good Question/Topic? 0
  • +

Replies To: VB.NET login using text file

#2 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5316
  • View blog
  • Posts: 11,356
  • Joined: 02-June 10

Re: VB.NET login using text file

Posted 21 December 2011 - 06:25 PM

This is such an non-secure way of doing logins it is ridiculous.

A - If you can't write a text file without destroying all the other contents: You aren't ready to make a program from scratch. You need to learn more first.

B - If you are writing a program that requires security and therefore logins, and you are doing to do it with text files like this: You aren't ready to make a program from scratch. You need to learn more first

Welcome to programming. Its a great hobby and can be a great career.

Let me say this though... It sounds like this is all VERY new to you. This type of thing is covered very early on in any self-teaching book. Which makes me think you really aren't ready to be designing an application yet.

Quote

I have a little programming experience but I need to write ...


You need to start there. I can't say "I have little experience in speaking Russian, but I have been assigned to write a mystery novel in Russian. Can you help me?"

We can help you by saying "First learn basic programming and the language of C#. Then take on assignments." Could someone here write this program for you? Sure. Could someone here map out all the processes you need to follow and do the Software Design part of this in the slim hope you could code it from there? Sure. But we don't volunteer to do the job that you're either getting paid for, or getting a grade for. You may want to read this.

For now, just work on the lessons. Do a self-teaching book from cover to cover. Then consider writing a program.

Don't try to create a useful working program to fit a need of yours (or a for-pay contract) as your introduction to coding project. When you are learning to code you don't know enough to code a program, let alone know how to engineer the architecture of a program. It would be like saying "I don't know how to read sheet music, or play an instrument. I think I'll write a 3 act opera as my first learning experience."

I don't say this to be mean. We've seen lots of new coders take this approach and we know it doesn't work. Trying to design your own programs before you understand the basics of the code language you've chosen just leads to problems, frustrations, and 'swiss-cheese' education (lots of holes).


Resources, references and suggestions for new programmers. - Updated Nov 2011
Spoiler

Was This Post Helpful? 0
  • +
  • -

#3 cbenjafield  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 21-December 11

Re: VB.NET login using text file

Posted 21 December 2011 - 06:42 PM

Its for a school project and we have been told to do it this way, the login is fine and works, but its the changing the pass that i cant get...
Was This Post Helpful? 0
  • +
  • -

#4 DimitriV  Icon User is offline

  • >not activating your almonds
  • member icon

Reputation: 555
  • View blog
  • Posts: 2,656
  • Joined: 24-July 11

Re: VB.NET login using text file

Posted 21 December 2011 - 08:31 PM

Hi
Is the password the fourth item in the string you demonstrated? If so, you could replace the item at the index (zero-based, therefore item 4 is item 3) in the array. I'm not sure if this will work:
StringArray.Item(3) = string
But as tlhIn `toq said this is a very insecure and undesirable way to store passwords. The registry is much better.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1