Bodybag Posted July 29, 2004 Posted July 29, 2004 What would happen if i stored a open connection object in a application variable and made it the only connection that i use.Would it improve performance.Crash out. Become terribly slow. Just an idea. Quote Programmers are trying to create bigger and beter idiot proof programs.The universe is trying to create bigger and beter idiots and so far the universe is winning.
jspencer Posted July 29, 2004 Posted July 29, 2004 You should really be using connection pooling. Create a new connection each time you need one using the exact same connection string. When you're finished with it, dispose it and the pool will do the rest for you. Don't keep the same connection constantly open because you'll have problems with multiple datareaders trying to use it simultaneously and throwing an exception. Quote
Bodybag Posted July 29, 2004 Author Posted July 29, 2004 I am using connection pooling currently. I don't like using datareader.I prefer Datatables. I was just wondering if this would actualy work. Quote Programmers are trying to create bigger and beter idiot proof programs.The universe is trying to create bigger and beter idiots and so far the universe is winning.
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.