怎么利用TStoredProc中的◎RETURN_VALUE得到存储过程执行的状态信息?
我在SQL SERVER 2000中创建了如下的一个存储过程
CREATE procedure login_proc
@username char(8)=null,
@password char(14)=null,
@userclass char(14) output
as
if (@username is null) or (@password is null)
begin
print('Error:你必须提供足够的参数 ')
return(1)
end
select @userclass=user_class
from user_info
where user_name=@username and password=@password
if @@Error<>0
begin
return(3)
end
else
begin
if @userclass is null
begin
print('Error:用户名或密码有误! ')
return(2)
end
else
begin
return(0)
end
end
GO
然后我想利用TStoredProc中的◎RETURN_VALUE得到其执行后的状态信息,可是
不论我输入正确参数,还是错误参数得到都是0,请问这是怎么回事呀?急问!!!!