Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to return output value from stored procedure?

Author  Topic 

samsun125
Yak Posting Veteran

63 Posts

Posted - 2008-11-10 : 01:13:26
Hi all,

i want to validate username and password from database if it is valid means i want to return a out parameter like rowid.

rowid username password
1 rama rama :here if rama is valid user means i want to return a rowid in xml format how to do .
i am using this stored procedure:
ALTER procedure [iphone].[securewebservice] --x,x
(
@username varchar(100),
@password varchar(100)
)
as
begin
if exists (select username from iphone.loginsecure where username=@username and password=@password)
end


Thanks & Regards
RamaDevi.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-10 : 01:27:03
[code]ALTER procedure [iphone].[securewebservice] --x,x
(
@username varchar(100),
@password varchar(100),
@status bit OUTPUT
)
as
begin
if exists (select username from iphone.loginsecure where username=@username and password=@password)
set @status=1
else
set @status=0
end
go


DECLARE @RetStatus bit

EXEC [iphone].[securewebservice] usernamevalu,passwordvalue,@RetStatus OUT

SELECT @RetStatus--this will return you the status[/code]

Go to Top of Page

samsun125
Yak Posting Veteran

63 Posts

Posted - 2008-11-10 : 02:20:49
thank you visakh16.

Regards
RamaDevi
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-10 : 02:23:41
Welcome
Go to Top of Page
   

- Advertisement -