Hi Ramakrishna,
datareader is useful only in the case where you need a limit amount data and more over it is active connection oriented, that is it will retain the connection unless and until we close it.. instead of that 1 we can use disconnected data binders such as DataAdapters,
dataadapter will retrieves the data completely and closes connections automatically...so we can use that one as our own object(Managed code).
even though if you want that one
then
Where cmd is an object of SqlCommand,
<pre lang="c#">
SqlDataReader dr=cmd.ExecuteReader();
dr.Read();