I use Strava to track my bicycle rides. Below you can see my recent activity.
I've been trying to get the MS Enterprise Library Data Access Applications Blocks working this morning. Yesterday I got the library setup and running. I started to implement the DAAB so that I could call a stored procedure, passing in a parameter, and retrieving a datareader that I could fill into a class. But I was having some horrible problems trying to get the stored procedure to run and fill the datareader using the DAAB.
I was continually getting the error “Object must implement IConvertible“ and was unable to figure out why this was.
sqlCommand = "spCMS_CustomerLostPasswordEmailAddress";
It would return the error while trying to perform the ExecuteReader command.
In order to get the code to successfully function I had to do the following
DBCommandWrapper dbcw = db.GetStoredProcCommandWrapper("spCMS_CustomerLostPasswordEmailAddress");dbcw.AddInParameter("@EmailAddress", DbType.String, identifier);
So if you're looking to use execute reader with the Microsoft Enterprise Library Data Access Application Blocks I hope the above code helps!
Also, some resources I used to figure all of this out!
Enterprise Library / Data Access Application Block Follow-upAn Introduction to the Microsoft Enterprise Library by Scott Mitchell
This website runs on the best open source content management system, DotNetNuke, it always runs the latest release.