odbc参数不足 期待是1 如何解决啊
我的代码如下
procedure TForm7.Button1Click(Sender: TObject);
var
a,d,e,s1,s2:Currency;
c,b:real;
begin
if (ComboBox1.Text='一月') and (Edit1.Text='') then
begin
adoquery2.close;
ADOQuery2.SQL.Clear;
adoquery2.SQL.Add('select 月人平均业绩,站月工资,提成系数 from 工资计算 where 月份=''一月''' );
adoquery2.open;
s2:=adoquery2.fieldbyname('月人平均业绩').asCurrency;
a:=adoquery2.fieldbyname('站月工资').asCurrency;
b:=strtofloat(adoquery2.fieldbyname('提成系数').asstring);
adoquery1.close;
ADOQuery1.SQL.Clear;
adoquery1.SQL.Add('select 业绩量 from 工作表 where 月份=''一月'' and 姓名 like'+'''%'+Edit1.Text+'%'''' ' );
adoquery1.open;
s1:=adoquery1.fieldbyname('业绩量').asCurrency;
if (s1<s2) and (s1=s2) then
begin
c:=b
end
else
begin
if s1-s2<1000 then
begin
c:=b
end
else if s1-s2<2000 then
begin
c:=b+0.02
end
else if s1-s2<3000 then
begin
c:=b+0.04
end
else if s1-s2<4000 then
begin
c:=b+0.06
end
else if s1-s2<5000 then
begin
c:=b+0.08
end
else if s1-s2<6000 then
begin
c:=b+0.1
end
else if s1-s2<7000 then
begin
c:=b+0.12
end
else if s1-s2<8000 then
begin
c:=b+0.14
end
else if s1-s2<9000 then
begin
c:=b+0.16
end
else if s1-s2<10000 then
begin
c:=b+0.18
end
else if s1-s2<11000 then
begin
c:=b+0.2
end
else if s1-s2<12000 then
begin
c:=b+0.22
end
else if s1-s2<13000 then
begin
c:=b+0.24
end
else if s1-s2<14000 then
begin
c:=b+0.26
end
else if s1-s2<15000 then
begin
c:=b+0.28
end
else if s1-s2<16000 then
begin
c:=b+0.3
end
else if s1-s2<17000 then
begin
c:=b+0.32
end
else if s1-s2<18000 then
begin
c:=b+0.34
end
else if s1-s2<19000 then
begin
c:=b+0.36
end
else if s1-s2<20000 then
begin
c:=b+0.38
end
else
begin
c:=b+0.4
end
end;
d:=s1*c;
e:=a+d;
Memo3.Text:=floatToStrF(a,ffFixed,20,1);
Memo4.Text:=floatToStrF(s1,ffFixed,20,1);
Memo5.Text:=floatToStr(c);
Memo6.Text:=floatToStrF(d,ffFixed,20,1);
Memo7.Text:=floatToStrF(e,ffFixed,20,1);
end