想点击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;
各位大大教教我应该怎样加啊?
解决方案 »
- delphi中的adoquery总是报错
- 怎样用调用资源管理器explore.exe打开指定的文件夹
- 软件发布:SmartSQL 3.2 for MSSQL
- 谁能给我一个D7的DelphiMM.dll,我的Delphi没这个文件
- ADOQuery中两个表的更新,可行否?
- oracle 中出现乱码的问题(贡献50分,在线等待中)
- Reg.ReadBinaryData读出来的值怎么存放?比如说读Address的值。
- 为什么在install spcomm组件时会出现internal error,导致无法加载spcomm控件?
- 怎样让edit.text,只能输入数字!!!!??????
- 当我累死的时候,请告诉我儿子,要上大学,不要当程序员
- 菜鸟问题.关于delphi调用DLL的问题,急
- 请问delphi中输出99乘法表格式总是无法控制请问怎样解决
肯定有的
调试器检测到错误
工程project1.exe检测到错误EAccessViolation,错误信息:‘access violation at address 004adddb in module'project1.exe'.read of address 00000000’.进程终止。使用单步或运行举行运行。
你看看你这句
edit1.text := dm.ADSsale.FieldByName('这里填写合计的字段名').AsString;
写的位置?