Okay so I am having a problem with my program, because everytime I run my program and login a registered username and password, these username and password are accepted by the program but once you try to save your schedule, and logout, the next time you login that username and password again? It will encounter an error, you can go see for yourself I have attached the file for the program anyway.

Here are is the username and password that you can try, see for yourself:

User: 111-11-1111
Pass: 111

This username and password is in a .dat file and is placed inside the debug folder and it's filename is 111-11-1111. This .dat file serves as the saving file for whatever changes made in the said account with the username 111-11-1111 and password 111, say for example you add subjects for that account or you changed your schedule, it will be saved in the .dat file itself.

First try to login, use the provided user and pass. Then just click save my schedule then logout, when you login again that user and pass, there will be an error I don't know what it is and why I am receiving it.

You can also use user 222-22-2222 and pass 222 or user 333-33-3333 with password 333 incase you can no longer login with the 111-11-1111 account for you to further understand the problem.

Recommended Answers

All 5 Replies

When you log in the second time where you have a schedule, you are looking for the class (as an example) "Art101-1", but the key for the actual class is "Art101 - 1" (notice the spaces). You need to be consistent in how you deal with the keys. Either make them with the spaces or without, not both.

Thanks Momerath for helping out, but I cannot find where I have made a mistake, can you point out the exact spot where I committed this?

please help...

I'm sorry to close this thread as solved, I thought I already solved my problem until I received the same error...

I do not get an error when entering '111-11-1111' and p/w 111

I get an error when entering 222-22-2222 and p/w 222...

Because you are doing

 string line = reader.ReadLine();

this is giving line = "";

after that you check if line is null...

  while (line != null)

it is not null so it continues and you try to pass fullSectionNumber to 'FindSection'

This is in Student.cs btw in 'ReadStudentData' function...

maybe you could help a bit more with the error??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.