我是在做一个统计查询功能,在点击按钮添加如下代码:sql.Add('select forgery_proof,a.buy_date,a.qi_value,buyID,first1,money1,second2,money2,person_amount,');
 sql.Add('case when charindex(a.first1,b.one+b.two+b.three+b.four+b.five)>0 then money1*3.5 else 0 end +');
 sql.Add('case when charindex(a.second2,b.one+b.two+b.three+b.four+b.five)>0 then money2*3.5 else 0 end total');
 sql.Add('from customer a inner join  startprize_table b on a.buy_date=b.startprize_date and a.qi_value=b.qi_value and forgery_proof=:forgery_proof');
 parameters.ParamByName('forgery_proof').Value:=trim(edit1.Text);
open;
我的主窗口是用来输入保存数据的
sql.Add('happy_incustomerStoreSave :buyID,:buy_date,:forgery_proof,:first1,:money1,:second2,:money2,:person_amount,:qi_value');
Parameters.ParamByName('buyID').Value:=EdtgetID.Text;
parameters.ParamByName('buy_date').Value:=formatdatetime('yyyy-mm-dd',buydate.Date);
 parameters.ParamByName('forgery_proof').Value:=EdtForgery_proof.Text;
parameters.ParamByName('first1').Value:=CmbOne.Text;
.......
Parameters.ParamByName('qi_value').Value:=startcount.Caption;
execsql;
执行程序之后点保存就死机,统计查询功能有用
结束进程之后就弹出"Project happyer.exe 
raised exception class E0leException with message'不正常地定义参数对象.提供了不一致或不完整的信息.'Process stopped.Use Step or Run continue."
申明一下:之前我没做统计查询功能的时候是可以保存的.我现在都不知道怎么办了,望高手能指点一下,感激不尽