This has already been answered in this thread
To re-iterate the resolution here's the following.
This is due to a fix made for a bug in EntLib 3.0. If you look at the source code for entlib 5.0, the ExecuteReader now wraps first the datareader instance to an instance of RefCountingDataReader. More info on this can be found in this
So, to sum up the workaround, you would create an extension method like this:
Public Function AsDataReader(ByVal reader As IDataReader) As IDataReader
Return DirectCast(reader, RefCountingDataReader).InnerReader
Your code now will look like this:
Dim strSQL As String = "SELECT ..."
Dim db As Database = DatabaseFactory.CreateDatabase()
DropDownList1.DataSource = db.ExecuteReader(db.GetSqlStringCommand(strSQL)).AsDataReader()
Global Technology and Solutions