因
因为我在
Unregistered / Unconfirmed
GUEST, unregistred user!
执行sql中的存储过程:
CREATE PROCEDURE monthdate
@classes1 varchar(20),
@classes2 varchar(20)
AS
begin
insert monthback (classes,tolltype_a,tolltype_b,tolltype_c,tolltype_d,tolltype_e,tolltype_f,tolltype_h,tolltype_i,
sumtolltype_a,sumtolltype_c,sumtolltype_h,sumtolltype_i,cartype_1,cartype_2,cartype_3,cartype_4,cartype_5,cartype_9)
(select classes,sum(tolltype_a),sum(tolltype_b),sum(tolltype_c),sum(tolltype_d),sum(tolltype_e),sum(tolltype_f),sum(tolltype_h),sum(tolltype_i)
,sum(sumtolltype_a),sum(sumtolltype_c),sum(sumtolltype_h),sum(sumtolltype_i),sum(cartype_1),sum(cartype_2),sum(cartype_3),sum(cartype_4),sum(cartype_5),sum(cartype_9)
from sfdetail
where (classes>=@classes1 and classes<=@classes2)
group by classes)
end
在delphi里用ADOStoredProc执行:
with ADOStoredProc1do
begin
Parameters.ParamByName('@classes1').Value:='2003-12-201';
Parameters.ParamByName('@classes2').Value:='2003-12-211';
ADOStoredProc1.Prepared;
ExecProc;
end;
报错:parmamter '@classes1'not found.
什么原因呢?
各位高手帮忙啊。
CREATE PROCEDURE monthdate
@classes1 varchar(20),
@classes2 varchar(20)
AS
begin
insert monthback (classes,tolltype_a,tolltype_b,tolltype_c,tolltype_d,tolltype_e,tolltype_f,tolltype_h,tolltype_i,
sumtolltype_a,sumtolltype_c,sumtolltype_h,sumtolltype_i,cartype_1,cartype_2,cartype_3,cartype_4,cartype_5,cartype_9)
(select classes,sum(tolltype_a),sum(tolltype_b),sum(tolltype_c),sum(tolltype_d),sum(tolltype_e),sum(tolltype_f),sum(tolltype_h),sum(tolltype_i)
,sum(sumtolltype_a),sum(sumtolltype_c),sum(sumtolltype_h),sum(sumtolltype_i),sum(cartype_1),sum(cartype_2),sum(cartype_3),sum(cartype_4),sum(cartype_5),sum(cartype_9)
from sfdetail
where (classes>=@classes1 and classes<=@classes2)
group by classes)
end
在delphi里用ADOStoredProc执行:
with ADOStoredProc1do
begin
Parameters.ParamByName('@classes1').Value:='2003-12-201';
Parameters.ParamByName('@classes2').Value:='2003-12-211';
ADOStoredProc1.Prepared;
ExecProc;
end;
报错:parmamter '@classes1'not found.
什么原因呢?
各位高手帮忙啊。