I am using .NET Framework 4.5 in Visual Studio 2012 and read its help on http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.connection.aspx. But in my code I cant get access to this property - it is inaccessible to a copy of SqlDataReader. How can I get readers SqlConnection ?
SqlCommandyou have used to get theSqlDataReaderhas a public propertyConnection.SqlDataReaderto another method at all? You should consume it where you executed it.