Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 Data Connection - Best Practice

$
0
0
Hello All,

I was having a debate with a colleague today re: best practice when it comes to handling connections to online databases.
Imagine a situation like this:
  • We connect to the database using one connection object
  • We make a query
  • As a result of that query, we need to make another

My colleague argues that it would be better to initiate a new connection object to make the new query; I argue that one should close the current connection object, wait for it to close and then re-connect using the same connection object to perform the new query.

Which do you prefer?

Jord

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>