Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
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.
Posted

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.

Posted
I am using connection pooling currently. I don't like using datareader.I prefer Datatables. I was just wondering if this would actualy work.
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...