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:
Ted Graham also wrote about it, specifically for Access.
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.
Tags - Browse all tags
Category - Browse all categories
Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.