susaabraham (2/21/2009)
db.AddInParameter(cmd, param.Key.ToString(), DbType.Object, param.Value);
There's your problem. According to the data type mapping on MSDN (http://msdn.microsoft.com/en-us/library/cc716729.aspx), DBType.object maps to SQL varient. So you're trying to pass all the parameters as SQL_variants and when one won't convert, you will get this error.
If you could change the code so that the types are set correctly for the parameters, the problem should go away. Either add the type to the hybridDictionary or infer the correct type when adding the parameter
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability