W
whdgd
Unregistered / Unconfirmed
GUEST, unregistred user!
BEGIN FOR SELECT kcls.WLDM, KCLS.PIHAO, KCLS.YWFZR,sum(KCLS.SL) as kcsl FROM KCLS where kcls.crksj>=:qsrq and kcls.crksj<=:jsrq group by wldm,ywfzr,pihao INTO :WLDM2, IHAO, :YWFZR, :kcsl DO BEGIN select spk.wldm,spk.spmc,spk.ggxh, spk.jldw,spk.sccj from spk where spk.wldm=:wldm2 into :wldm,:spmc,:ggxh,:jldw,:sccj; SUSPEND; ENDEND上面的存储过程在IB下执行没问题在DELPHI中我用DbExpress的TSQLStoredProc控件做为DATESET在按钮执行中的代码dm.sdkc.Close;//dm.sdkc.ParamCheck:=true;dm.sdkc.StoredProcName:='kccx';dm.sdkc.Params.Clear;dm.sdkc.Params.CreateParam(ftdate ,'qsrq',ptinput);dm.sdkc.Params.CreateParam(ftdate ,'jsrq',ptinput);dm.sdkc.Params.CreateParam(ftString ,'wldm',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'pihao',ptoutput);dm.sdkc.Params.CreateParam(ftinteger ,'kcsl',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'ywfzr',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'wldm2',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'spmc',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'ggxh',ptoutput);dm.sdkc.Params.CreateParam(ftString ,'jldw',ptoutput);dm.sdkc.ParamByName('qsrq').AsDate:=rzdatetimeedit1.Date;dm.sdkc.ParamByName('jsrq').AsDate:=rzdatetimeedit2.Date;dm.sdkc.ExecProc;kccx是存储过程名,现运行程序时提示错误List index out of bounds(0),这是哪儿出的错啊??