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

VS 2010 Re-use SQLConnection recursively?

$
0
0
I'm porting a legacy ASP application to ASP.Net. I'm trying to determine if I can re-use the SqlConnection object (and the SqlCommand object) recursively? Here's the scenario:

Open SqlConnection
Execute SqlCommand returning SqlDataReader1
While loopping through SqlDataReader1
Execute SqlCommand returning SqlDataReader2
Close SqlDataReader2
Execute SqlCommand no return
End while
Close SqlDataReader1
Close SqlConnection

I've tried searching through the MS documentation but I can't seem to find a clear answer. All the example code is much more trivial than this.

Viewing all articles
Browse latest Browse all 27348

Trending Articles



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