我正在尝试收集出价并从列中分配平均值
我收到一个 InvalidCast Exception: Specified cast is not valid。在总和 +=
任何帮助将不胜感激
Dim sql As String = "SELECT " & Column & " FROM " & Table & " ;"
Dim dt As DataTable = SQLiteDatabase.GetDataTable(sql)
Column = Column.Replace("[", "")
Column = Column.Replace("]", "")
For Each row As DataRow In dt.Rows
TotalSum += DirectCast(row(Column), Integer)
Console.WriteLine("Calculating TotalSum {0}", TotalSum.ToString)
Next row