标题:这段统计语句为何执行不行?
取消只看楼主
青鸟初飞
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-12-18
 问题点数:0 回复次数:0 
这段统计语句为何执行不行?
Edit4.text框中能显示统计数据
Edit5.text框中不能显示统计数据

部分代码:

with ADOQuery1 do
begin
close;
SQL.Clear;
sql.Add(sql_str); //添加SQL查询语句
open;
sum:=0;
summ:=0;
if N54.Checked=true then begin
first;
while not eof do
begin
if ADOQuery1.fieldbyname('管道段长度').asstring<>'' then
sum:=sum+ADOQuery1.fieldbyname('管道段长度').value;
if ADOQuery1.fieldbyname('总孔数').asstring<>'' then
summ:=sum+ADOQuery1.fieldbyname('总孔数').value;
next;
end;
Edit4.text:=inttostr(sum);
Edit5.text:=inttostr(summ);
搜索更多相关主题的帖子: 语句 统计 
2006-12-27 11:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-112442-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.396207 second(s), 10 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved