if exists(select 1 from sysobjects where id= object_id('cp_xxx')and type= 'p')
drop procedure cp_xxx
go
create procedure cp_xxx
@rs varchar(50) output
as
set @rs = 'lionheart'
go
procedure TForm1.Button1Click(Sender: TObject);
begin
with ADOQuery1 do
begin
close;
sql.Text:= 'declare @rs varchar(50) exec cp_xxx @rs output select @rs';
Open;
Edit1.Text:= Fields[0].AsString;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ADOStoredProc1.ExecProc;
Edit1.Text:= ADOStoredProc1.Parameters[0].Value;
end;