这会回报我想要的价值吗? [英] Will This Return A Value Of What I Want?

查看:77
本文介绍了这会回报我想要的价值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private double totalPrice(double r)
{
connection...
command...
command.commandtext = "select @gg = SUM(TotalPrice) FROM inventoryout";
command.parameters.addwithvalue("@gg", r);
command.prepare();
cmd.executenonquery();
con.close()
return r;
}





inventoryout的totalPrice总和= 50000;



the sum of totalPrice from inventoryout = 50000;

推荐答案

忘记参数并执行以下操作:
Just forget the parameter and do this:
command.commandtext = "select SUM(TotalPrice) FROM inventoryout";
int total = cmd.ExecuteScalar();


这篇关于这会回报我想要的价值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆