garuka

garuka

  • NA
  • 26
  • 0

how to keep username globally

Sep 11 2009 9:46 AM
Here is the problem. I'm developing an application where multiple users are gonna connect to database using different user accounts which has diffrent levels of access rights.
So when someone connects to DB application prompt for username and password and store them.
For that at the moment I'm using a static class. Which contains all the information such as usernames, passowrds etc etc. all as static ones.
So when I want to retrive username I can simply user ClassName.UserName and get the value.

This is workign perfectly fine for single user scenario. What I want to know is will this be alright in multi user environment? if not what is the best alternative I have?

Answers (3)