davidrobin Posted May 19, 2004 Posted May 19, 2004 Is there any safe number of session variables to have. I have 6 and they are small strings, no objects. I was thinking of storing the database connection object in a session variable but then you get into all sorts of checks depending on which page the user happens to start their navigating at. Quote
Moderators Robby Posted May 22, 2004 Moderators Posted May 22, 2004 Why not store the connection string in a class or in the web.config. Quote Visit...Bassic Software
davidrobin Posted May 24, 2004 Author Posted May 24, 2004 Why not store the connection string in a class or in the web.config. I keep switching between the two options for the connection string, what I am thinking is I could store the actual connection object in a session variable then I can keep the same connection without having to open a new connection on each page. As I understand it, with storing it in a session object the connection will not close until the session ends. This could mean a number of redundant connections could be lying around. Instead of 6 session objects I could have my data in a class and put the class in a session object then the data is persisting. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.