1

我似乎无法弄清楚这一点。我得到的错误是

“传入的表格数据流 (TDS) 远程过程调用 (RPC) 协议流 > 不正确。参数 13 (“@10”):提供的值不是数据类型 >float 的有效实例。检查源数据是否无效值。无效值的一个示例是 >numeric 类型的数据,其比例大于精度。”

我已经检查了 NaN 的每个值。首先使用代码创建数据库。但是,当我尝试使用 dbcontext 添加一些值时,我得到了错误。

这可能与我尝试插入的双精度值是通过使用 double.parse() 解析字符串生成的事实有关。

任何建议表示赞赏!谢谢

4

2 回答 2

0

I was receiving the same error for a parameterized query. I found that the value I was trying to pass to the SqlCommand object was actually a value resulting from a division by zero. The error wasn't triggered by the actual division by zero calculation, the Double variable accommodated that by storing a value that looked like -1.#IND But then when I tried to pass that value to the SqlCommand object for the parameter specified in the error, then I got the error above when I tried to execute the query.

于 2013-11-01T17:00:03.723 回答
-2

对于任何想知道的人,我发现了这个:http ://www.datawizard.com/它使我陷入困境。

我认为某些 sql 服务器中内置了类似的东西,但我的没有,所以我使用了它。

感谢 Rick B 为我指明了正确的方向!

于 2012-11-13T16:17:43.923 回答