.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2018.3.9.1
错误所在事件:
详细错误信息:
选择列表中的列 't_ICItemCore.FNumber' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。
.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2018.3.9.1
错误所在事件:窗口,窗口6,Button4,Click
详细错误信息:
未将对象引用设置到对象的实例。
-------------------------代码如下:----------------------
Dim cmd As new SQLCommand
Dim Sqldt As DataTable
cmd.C
cmd.CommandText = "Sel ect b.FNumber As 代码,b.FName As 名称,b.Fmodel as 规格型号,sum(c.FQty) as 库存数量 from {t_ICItemCore} As b "
cmd.CommandText &= " left join {ICInventory} As C on c.FItemID = b.FItemID GROUP BY b.FNumber"
cmd.CommandText &= " where b.FNumber = '3.02.05.02.0017A'"
Sqldt = cmd.ExecuteReader
Dim tb As Table = Tables(e.Form.Name & "_Table1")
tb.DataSource = sqldt
If sqldt.DataRows.Count > 0 Then
MessageBox.Show(sqldt.DataRows(0)("库存数量"))
End If