P
pcgod
Unregistered / Unconfirmed
GUEST, unregistred user!
存储过程如下:
create proc getmoney
@name char(20),@theMoney int output
as
begin
select @theMoney = money from one where name = @name
end
GO
-------------------------------------------
前边:
object ADOQuery2: TADOQuery
Connection = ADOConnection1 //只指定了链接没有指定参数
Parameters = <>
Left = 96
Top = 96
end
//以下不能取到 Money ,编译无错执行错误
with ADOQuery2 do
begin
Close ;
Sql.Clear ;
Sql.Text := 'exec getmoney ''aaa'',0' ;
Open ;
Label1.Caption := IntToStr(Parameters.ParamByName('themoney').Value) ;
end;
请您指导,谢谢
create proc getmoney
@name char(20),@theMoney int output
as
begin
select @theMoney = money from one where name = @name
end
GO
-------------------------------------------
前边:
object ADOQuery2: TADOQuery
Connection = ADOConnection1 //只指定了链接没有指定参数
Parameters = <>
Left = 96
Top = 96
end
//以下不能取到 Money ,编译无错执行错误
with ADOQuery2 do
begin
Close ;
Sql.Clear ;
Sql.Text := 'exec getmoney ''aaa'',0' ;
Open ;
Label1.Caption := IntToStr(Parameters.ParamByName('themoney').Value) ;
end;
请您指导,谢谢