T
tigeryt
Unregistered / Unconfirmed
GUEST, unregistred user!
create procedure getAvg
@khbh varchar(20),
@avg float output
as
declare @ErrorSave int
set @ErrorSave=0
select @avg=avg(balance) from jpye where userno=@khbh
if (@@error<>0)
set @errorSave=@@error
return @errorSave
go
在Delphi中执行存储过程,问题出在下面:
with adostoredproc1 do
begin
procedurename:='getAvg;1';
parameters.ParamByName('@khbh').Value:='0000134811';
execproc;
edit1.Text:=floattostr(parameters.parambyname('@avg').Value);
end;
为什么我在运行的时候老找不到参数@khbh呢?
@khbh varchar(20),
@avg float output
as
declare @ErrorSave int
set @ErrorSave=0
select @avg=avg(balance) from jpye where userno=@khbh
if (@@error<>0)
set @errorSave=@@error
return @errorSave
go
在Delphi中执行存储过程,问题出在下面:
with adostoredproc1 do
begin
procedurename:='getAvg;1';
parameters.ParamByName('@khbh').Value:='0000134811';
execproc;
edit1.Text:=floattostr(parameters.parambyname('@avg').Value);
end;
为什么我在运行的时候老找不到参数@khbh呢?