Object Must Implement IConvertible with MS Data Access Application Block
Date Published: 18 August 2003
Ran into this bug today. I’m not the first, as a quick google search found:
I think I’m close to finding the actual bug in the C# version of the DAAB, but I don’t have time to totally fix it just yet. However, I did find a workaround that I hope will help some folks. I was calling a stored procedure like so:
return SqlHelper.ExecuteDataset(ConnectionString, “usp_ListAuthors”, sqlArgs).Tables;
All I did to fix it was switch to another overload:
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, “usp_ListAuthors”, sqlArgs).Tables;
Simply specifying the CommandType fixed it. I’m sure the other version has a bug in it – if you have the exact fix, I’d love to hear it.
Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.