Help! — MS Enterprise Library DAAB – Object must implement IConvertible

April 1, 2005 Off By David

I am having real problems with the above error (which after searching on google seems to have been inherited from the old DAAB) when calling db.UpdateDataSet.

I am attempting to update a SQL database from a dataset with 8 or tables in them… under a transaction.



This fault caught me several times and it transpires that it actually WAS down to an illegal casttyping….
I use NullableTypes and was passing a NullableDateTime directly where what I should have been doing was something like Convert.ToDateTime(MyDateOfBirthAsNullableDateTime.toString()).

So there you go!