想点击buttom1然后edit1显示 统计出表sale中的total
在查询分析器中我使用了compute sum(toeal)可以显示出来!但是不知怎样用edit1显示!
以下是buttom1代码:
procedure Tquerysale.Button1Click(Sender: TObject);
begin
dm.ADSsale.Close;
dm.ADSsale.CommandText:='select sale.*,goods.g_name from sale, goods where Sale.g_id=goods.g_id and S_date between '+#39+datetostr(datetimepicker1.Date)+#39+' and '+#39+datetostr(datetimepicker2.Date)+#39+'compute sum(total)';
dm.ADSsale.Open;
if dm.ADSsale.RecordCount<0 then
application.MessageBox('没有销售记录,请确认日期!','商品销售查询',mb_ok+mb_iconerror+mb_applmodal);
end;
各位大大教教我应该怎样加啊?
在查询分析器中我使用了compute sum(toeal)可以显示出来!但是不知怎样用edit1显示!
以下是buttom1代码:
procedure Tquerysale.Button1Click(Sender: TObject);
begin
dm.ADSsale.Close;
dm.ADSsale.CommandText:='select sale.*,goods.g_name from sale, goods where Sale.g_id=goods.g_id and S_date between '+#39+datetostr(datetimepicker1.Date)+#39+' and '+#39+datetostr(datetimepicker2.Date)+#39+'compute sum(total)';
dm.ADSsale.Open;
if dm.ADSsale.RecordCount<0 then
application.MessageBox('没有销售记录,请确认日期!','商品销售查询',mb_ok+mb_iconerror+mb_applmodal);
end;
各位大大教教我应该怎样加啊?
解决方案 »
- djshr是哪个公司的软件?
- 急求一个简单程序交作业~
- select count(1) from table1 这句话什么意思?
- 安装第三方控件问题
- 程序出错,找不到dxtree.dcu,delphi理由这个控件吗?
- 关于控件webbrower的一点小问题
- 有关查询与更新的难题(paradox)
- 如何在word文件中的指定的某个位置插入一个表格!!!
- 求助?谁能帮我,改变DELPHI编译产生的可制行文件最终图标,即不是默认的那个,怎样在代码中改变呢?
- Datasnap Server 跨域访问问题
- 不显示删除回复显示所有回复显示星级回复显示得分回复 一个doc文件先LOADFROMFILE倒入ORACLE数据库,再SAVETOFILE后发现成乱码了[问题
- qreport
application.MessageBox('没有销售记录,请确认日期!','商品销售查询',mb_ok+mb_iconerror+mb_applmodal);
else
edit1.text:=dm.ADSsale.fieldbyname('统计字段名').asstring;