Thanks,
Jeff
Actually, it's not totally true that DataReaders have to open on individual
connections. You can't have 2 active DataReaders on 1 connection, but if
you queue up your database access, I believe multiple DataReaders can use
the same connection (they just have to take turns, and be done, before the
next one uses the connection). I haven't used DataReaders much, but I
believe that is true (in my mind, they're like ADO recordsets).
DataSets actually are disconnected, so they use 0 (zero) connections. You
can Fill a DataSet over DataAdapter (which uses a connection). You can
certainly reuse the same Connection for multiple DataAdapters.
"jeff" <je...@datahook.com> wrote in message
news:OWrbSykwCHA.640@TK2MSFTNGP12...
Next, MSDE is not governed by connections. It never has been. This is a
common misconception. MSDE is governed by simultaneous tasks. That is, a
connection does not count against the task count unless you are actually
executing something. This means you can have hundreds of connections and the
governor won't kick in as long as fewer than 5 of those connections have
active tasks.
Yes, it's possible to share a single connection with MSDE. It's easiest
with the DataAdapter.Fill/Update methods as connections are not left in an
unusable state. If you use the DataReader, you're in charge of making sure
the DataReader completes rowset population or is closed before trying to use
it again. It's the DataReader that leads to most Connection leaks that
eventually bring your system to it's knees.
hth
--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"jeff" <je...@datahook.com> wrote in message
news:OWrbSykwCHA.640@TK2MSFTNGP12...
Basically, you can use a single connection as long as you remember to CLOSE
that datareader before attempting to use it again...
And you might also have some transactional issues, as you cannot run
multiple transactions at the same time through one connection...
-Inge
"William (Bill) Vaughn" <billvaRe...@nwlink.com> wrote in message
news:OZDN7OmwCHA.968@TK2MSFTNGP12...