-- 定义三个参数变量,注意第三个,特别标记是用于输出 @au_lname varchar (20), @intID int, @intIDOut int OUTPUT
AS
SELECT @intIDOut = @intID + 1
SELECT * FROM authors WHERE au_lname LIKE @au_lname + '%'
--直接返回一个值 RETURN @intID + 2
调用该存储过程的asp程序如下:
%@ Language=VBScript %> % Dim CmdSP Dim adoRS Dim adCmdSPStoredProc Dim adParamReturnValue Dim adParaminput Dim adParamOutput Dim adInteger Dim iVal Dim oVal Dim adoField Dim adVarChar