CREATE PROCEDURE Abnormity_T
@result varchar(80) output
AS
begin
set @result = 'Hello World'
end
GO
AS
begin
set @result = 'Hello World'
end
GO
===============================================
在查询分析器里面输入下面可看到结果,
DECLARE @result varchar(80)
exec Abnormity_T @result output
print @result
------------------------------------------------------------------------------
在ASP页面调用,
set rs = Server.CreateObject("ADODB.RecordSet")
sql="declare @result varchar(80);exec Abnormity_T @result output;select @result"
rs.open sql,conn,1,1
response.Write rs(0)
rs.close
来自转帖