G
Guest
Hi all, I've created a web application and currently I'm NOT making use of connection pooling
Right now I have a public shared variable in my Global class of type System.Data.oledb.OleDbConnection. I also have a shared member boolean variable that indicates whether connection has been initialized
Then in my New Sub within the Global class I check the boolean variable and if it is false, then I set it to true and initialize the connection
Then all of the vb classes in my web application uses that single connection object
Since this web application will likely have more than one user accessing it simulataneously - should I be making use of connection pooling? If so, how can I do this "properly"? Also, (connection pooling aside) am I using the right approach in intializing the connection in the New sub? The only thing I really like about my approach is that it
1. makes it easy to change which database my application as a whole connects t
2. ensures that all DB requests are sent to a common Database - as opposed to creating a separate connection object for each class that accesses the database
Lastly, the only way I'll attempt to close the connection is if I get an exception when I open it. Is there an appropriate place to close the connection
Thanks
Novice
Right now I have a public shared variable in my Global class of type System.Data.oledb.OleDbConnection. I also have a shared member boolean variable that indicates whether connection has been initialized
Then in my New Sub within the Global class I check the boolean variable and if it is false, then I set it to true and initialize the connection
Then all of the vb classes in my web application uses that single connection object
Since this web application will likely have more than one user accessing it simulataneously - should I be making use of connection pooling? If so, how can I do this "properly"? Also, (connection pooling aside) am I using the right approach in intializing the connection in the New sub? The only thing I really like about my approach is that it
1. makes it easy to change which database my application as a whole connects t
2. ensures that all DB requests are sent to a common Database - as opposed to creating a separate connection object for each class that accesses the database
Lastly, the only way I'll attempt to close the connection is if I get an exception when I open it. Is there an appropriate place to close the connection
Thanks
Novice