边
边城过客
Unregistered / Unconfirmed
GUEST, unregistred user!
我在dephi6.0+ado查询控件中写入下面语句;<br>在adoquery中进行了sum统计,然后将统计值赋给变量A26(integer),但不行,源码如下:<br>var a26:integer;<br>adoquery2.Active:=false; //计算本期营销人员签约员工数<br>adoquery2.sql.Clear;<br>adoquery2.SQL.add('select sum(yxy) as A26 From rsjggl where jgjb=:B01');<br>adoquery2.Parameters[0].Value:=trim(ADOquery1.fieldbyname('xm').value);<br>adoquery2.Active:=True;<br>A26:=adoquery2.Fields[0].Value;<br>运行后提示:<br>Project zhonghuarenshi.exe raised exception class EOLeException with message<br>'sum or average aggregate 运算不能以char数据类型作为参数。'Process stopped.Use step or Rum to continue.<br><br>请高手们帮我看看,万分感谢!!!