User Profile

Collapse

Profile Sidebar

Collapse
UlrikSL
UlrikSL
Last Activity: Sep 6 '08, 09:47 PM
Joined: Aug 14 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for the answer..

    After implementing the close and open in my singleton I still got some errors with my connection, now it was because of connection was still open. But I was closing the connection in a finalize, so I was sure it was closed everytime. After adding some sync locking to my code, everythings works like a charm.. Didn't know that asp.net runs its code-behind in multiple threads.. hmm..
    See more | Go to post

    Leave a comment:


  • UlrikSL
    started a topic SQLConnection open and close vs. staying open.
    in .NET

    SQLConnection open and close vs. staying open.

    My question is performance wize, is it better to open and close each time I make a request to the database, in small periods I make like 5 queryes a second, other times only every 10 seconds.

    I can understand that close and open do not close the underlaying connection, so would the correct way be to open and close with each request, and give a better chance of avoiding faulty connection? Or would it cause worse performance?
    ...
    See more | Go to post
No activity results to display
Show More
Working...