聚合函数Sum()和Type:String的使用无效。 [英] Invalid usage of aggregate function Sum() and Type: String.
本文介绍了聚合函数Sum()和Type:String的使用无效。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
totalcount = dt.Tables(LossData)。计算(Sum(losscount),Nothing)
totalcount = dt.Tables("LossData").Compute("Sum(losscount)", Nothing)
推荐答案
检查<$ c的定义$ c> losscount 列 - 它可能是一个字符串。您可能需要在Sum中使用Convert函数,或者更改DataTable以保存数值。
Check the definition of the losscount
column - it's probably a string. You may need to use the Convert function inside the Sum, or change your DataTable to hold a numeric value.
这篇关于聚合函数Sum()和Type:String的使用无效。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文