You can use an OUT parameter to send a value back.
If you just need to know if it was successul, you cuold have a CHAR field that returns Y or N depending on if it was successful. It's been a while since I did it, but possibly something like this:-
Code:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_Register`(
In FirstName varchar(50),
in LastName varchar(50),
in EmailId varchar(100),
in Gender varchar(20),
in Mobile varchar(25),
in Pswd varchar(20),
Out Result CHAR(1))
BEGIN
IF NOT EXISTS(SELECT Email_Id FROM tblUserMaster WHERE Email_Id = EmailId) THEN
Insert into tblUserMaster (First_Name, Last_Name, Email_Id, User_Gender, User_Mobile,
Registration_Date, LastLogin_Date, User_Pswd)
Values (FirstName, LastName, EmailId, Gender, Mobile, now(), now(), Pswd);
Result="Y";
ELSE
Result="N";
END IF;
END
I think in your .NET code, you create an instance of a parameter and set it to the OUT parameter from the SP.
Hope that helps.
Bookmarks