请快点帮我阿明天就出货,在线等待,先谢谢了就10分了(10分)

  • 主题发起人 wyismail
  • 开始时间
W

wyismail

Unregistered / Unconfirmed
GUEST, unregistred user!

CMeetReseanStr:= ' select count(*) as t from meettable m,eventproperty ep,eventreason er'+
' where m.reasoncode = er.reasoncode and m.eventprocode = ep.eventprocode'+
' and ep.name ='+#39+GRowname+#39+' and er.name ='+#39+GLinename+#39+
' and m.catchtime >='+#39+FormatDateTime('YYYY-MM-DD', GStartDate)+#39+
' and m.catchtime <='+#39+FormatDateTime('YYYY-MM-DD', GEndDate)+#39 ;

1 GLineName:=TemParLine;GRowName:=TemParRow;
2 MeetArray[i,j]:= DoSelectParForI(CMeetReseanStr);
DoSelectParForI是动态创建了一个ADOQUERY然后返回一个整数,放到数组里面
可是 GLineName:=TemParLine;GRowName:=TemParRow; 并没其作用
其值为空
' select count(*) as t from meettable m,eventproperty ep,eventreason
er where m.reasoncode = er.reasoncode and m.eventprocode = ep.eventprocode
and ep.name ='' and er.name ='' and m.catchtime >='2002-12-01' and m.catchtime <='2002-12-31''
我知道只要把SQL字符串放在 GLineName:=TemParLine;GRowName:=TemParRow;后边
就可以了,可是我的SQL太多了没办法啊

 
还有 CMeetReseanStr,GLineName ,Growname都是全局变量
 
把GLineName设成参数
query.Parameters.ParamByName('GLineName').Value := TemParLine;
 
高手阿以后一定给你加分阿请帮我这次
 
To dae:
不行阿我的代码都差不多完成
如果这样作我要花很多天
因为我作的是综合报表SQL特别多
 
接受答案了.
 
顶部