W
wh88
Unregistered / Unconfirmed
GUEST, unregistred user!
下面语句为什么在win98系统 下 提示“无法识别指定类型名”,因为是给别人用,没98环境,所以无法测试,谁知道的麻烦答复下,谢谢。procedure TForm1.RzBitBtn1Click(Sender: TObject);var Year, Month, Day: Word;beginDecodeDate(date(),Year, Month, Day); if (trim(rzedit1.text)<>'') and (trim(RzComboBox1.Text)<>'') then begin with ADOQuery3 do begin close; sql.clear; sql.add('select a.bm,sysl=isnull(a.qcsl,0)+isnull(b.fssl,0),syje=isnull(a.qcje,0)+isnull(b.fsje,0) from (SELECT bm,QCSL,QCJE FROM CLZZ WHERE KSBM='''+RzCombobox1.Values[RzCombobox1.ItemIndex]+''''); sql.add(' AND NIAN='+inttostr(year)+' AND YUE=1 AND BM='''+trim(rzedit1.text)+''')a,(SELECT FSSL=SUM(CASE WHEN FLAG & 1=0 THEN SL ELSE 0-SL END), FSJE=SUM(CASE WHEN FLAG & 1=0 THEN JE ELSE 0-JE END) FROM CLMXZ'); sql.add(' WHERE KSBM LIKE '''+RzCombobox1.Values[RzCombobox1.ItemIndex]+''' AND BM='''+trim(rzedit1.text)+''' AND RQ>=:rq1 AND RQ<=:rq2)b' ); Parameters.ParamValues['rq1']:=trunc(StartOfAYear(year)); Parameters.ParamValues['rq2']:=trunc(date()); open; rzedit3.text:=FieldByName('sysl').asstring; end; with ADOQuery4 do begin close; sql.clear; sql.add('update rkd1 set sysl=0,syje=0 from rkd1 A,RKD0 B WHERE a.bm='''+trim(rzedit1.text)+''' and A.RKDH=B.RKDH and b.flag=2 AND B.FROMKSBM LIKE '''+RzCombobox1.Values[RzCombobox1.ItemIndex]+''''); execsql; end; with ADOQuery4 do begin close; sql.clear; sql.add('select r3.* from rkd1 r3,(select r1.bm,rkdh=max(r1.rkdh) from rkd0 r0,rkd1 r1 where r1.bm='''+trim(rzedit1.text)+''' and r0.fromksbm='''+RzCombobox1.Values[RzCombobox1.ItemIndex]+''' and r0.rkdh=r1.rkdh and r0.flag=2 group by r1.bm)r4 where r3.bm=r4.bm and r3.rkdh=r4.rkdh'); open; edit; FieldByName('sysl').asfloat:=ADOQuery3.FieldByName('sysl').asfloat; FieldByName('syje').asfloat:=ADOQuery3.FieldByName('syje').asfloat; post; end; end; Showmessage('---------修改成功----------!');end;