Hi,
I am creating a stored procedure which contains an output parameter.
Though the procedure is getting compiled properly I am not able to
execute it from within SQL Server Management Studio and also through
an aspx page. I keep getting empty output (not null)
The code:
Create procedure LoginUser
@cust_Password varbinary,
@cust_name varchar,
@cust_id int output
AS
BEGIN
SELECT @cust_id=Id from Customer where Name=@cust_name and
Password=@cust_Password;
END
How can I retreive the value @cust_id ?
SoftLion - 27 May 2008 11:48 GMT
Use
SELECT Id from Customer where Name=@cust_name and
Password=@cust_Password;
And call ExecuteScalar
Munna - 27 May 2008 11:49 GMT
> Hi,
> I am creating a stored procedure which contains an output parameter.
[quoted text clipped - 20 lines]
>
> How can I retreive the value @cust_id ?
Hi
check out this thread, just check the last message
http://forums.asp.net/p/1208409/2362152.aspx
here is a good article that demonstrate Using Output Parameters
http://aspnet.4guysfromrolla.com/articles/062905-1.aspx
Best of luck
Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com