D'après ce que je lis ici :
http://msdn.microsoft.com/en-us/libr...(SQL.100).aspx
il me semble qu'un type double C# peut etre mappe sur un tupe float sous sql server.
Or je prends l'erreur suivante :
System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 8 ("@monParam"): The supplied value is not a valid instance of data type float. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision.
Comment est ce possible sachant que je dis explicitement que mon champ doit etre du :
parameters.Add(CreateParameter(dbCmd, "@monParam", "maColonne", DbType.Double));
avec
1 2 3 4 5 6 7 8 9
| protected static IDbDataParameter CreateParameter(IDbCommand dbCmd, string parameterName, string sourceColumn,DbType dbType)
{
IDbDataParameter param = dbCmd.CreateParameter();
param.ParameterName = parameterName;
param.SourceColumn = sourceColumn;
param.DbType = dbType;
return param;
} |
Partager