In my asp.net page I pass paremeters to a stored procedure and then inside a try blog the foloving line: affectedRows = ssqldbsorce.insert
never returns expected result from stored procedure.
Inside stored procedure event if I explicitely write the following line "return 5" for example, it never returns 5, only -1, 1, 2
For example here a very simple one without output parameters(I still should be able to return a value without output parameters, right?):
ALTER PROCEDURE [dbo].[createUser]
SELECT * FROM dbo.reg_code WHERE reg_code=@regCode
---other statements, and for the sake of the example lets return 5
Is there something wrong with doing it thi way, here is also a tutorial, according to which it should work just fine: http://www.developerfusion.com/samplechapter/91/stored-procedures/4/
Is there another way maybe in the assp.net page to capture the value in the variable from a stored procedure.
View Complete Post