title: Optimal way of storing current user data over multiple classes
body: <p>I have a login page which connects to a Database, the Database has only one client, when a user logs on he/she may make certain changes to his profile and then save. A large number of frames require the current user id in order to manipulate his data </p>
  
  <p>Among the possible ways of storing the user currently logged in is</p>
  
  <p>1) to save the data to a temporary text file and persist it before the user logs out </p>
  
  <p>2) another option would be to use variables across all the frames ,however I'm not too confident about this</p>
  
  <p>3) a third way would be to have a Boolean column in the database and to persist the the data of the field with true in it </p>
  
  <p>Perhaps there are better ways of storing the current user Id could somebody elucidate other possible methods and highlight the pros and cons of each implementation with reference to an "optimal" method of doing this</p>
  
  <p>Edit: This is a desktop application</p>