Sahil
Wed Aug 31 20:50:34 CDT 2005
DataReader is connected.
1. That depends on the locking mechanism you are using in your query.
2. Not necessarily
3. Yes it is connected. But close on a datareader doesn't close the connect
unless you use CommandBehavior.CloseConnection.
--
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
"Water Cooler v2" <wtr_clr@yahoo.com> wrote in message
news:1125532558.297415.153040@o13g2000cwo.googlegroups.com...
> Like the dataset, is the datareader also a disconnected datasource? It
> doesn't look like because of two reasons:
>
> (1) It is forward only. Having a connected stream would make more sense
> to reflect recent updations to the original database from other
> connections of other users.
>
> (2) It would be more performance intensive if it were to be
> disconnected.
>
> (3) It has a Close() method on it. It implies it is connected.
>
>
> What's the truth?
>