Click here to Skip to main content
15,886,087 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i want give me return a value bool from stored procedure and because use EF i can't use this:
SQL
@out bit output

please help me
my code:
SQL
CREATE proc checkuser
 
@user nvarchar(50),
 
@pass nvarchar(50)
 
as
 
declare @result int
 
declare @out bit
 
begin
 
select @result= COUNT(*) from users where userr=@user and pass=@pass
 
if(@result>0)
 
set @out=1
 
return @out
 
end
 
go
Posted
Updated 14-Sep-14 18:12pm
v2
Comments
George Jonsson 14-Sep-14 11:46am    
You should tag your question properly to get the best help possible.
This is not a c# question.

Hello,

Please checkout this[^] tutorial.

Regards,
 
Share this answer
 
Comments
CPallini 14-Sep-14 13:11pm    
5.
Prasad Khandekar 14-Sep-14 13:49pm    
Thank's
ThanX Dearr
SQL
CREATE proc checkuser
@user nvarchar(50),
@pass nvarchar(50)
as
declare @result int
declare @out bit

set @result=(select COUNT(*) from users where userr=@user and pass=@pass)
if (@result>0)
begin
set @out=1
select @out

end
go
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900