直接用sql命令,就可以统计单个数据
Dim cmd As new SQLCommandDim sum0 As Integercmd.Ccmd.CommandText = "Select sum(数量) From [订单明细] where 审核 = true"sum0 = cmd.ExecuteScalar()output.show(sum0)