note 93546 deleted from function.mssql-execute by googleguy

From: Date: Tue, 22 Oct 2013 11:16:53 +0000
Subject: note 93546 deleted from function.mssql-execute by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197068@lists.php.net to get a copy of this message
Note Submitter: vitali at lumensoftware dot com ---- In a similar way as one of the post above, when I was trying to execute a stored procedure, I was getting "stored procedure execution failed." However, mssql_query was working fine. Instead of changing the config file, I have found a way to execute stored procedure and return parameters from it in the SQL statement. Below is the example SQL DECLARE @Success bigint, @oSuccess bigint; DECLARE @UserID bigint, @oUserID bigint; EXEC dbo.sp_Login @UserName='user', @UserPassword='pass', @Success=@oSuccess OUTPUT, @UserID=@oUserID OUTPUT; SELECT success=@oSuccess, userid=@oUserID; Note, that I pass 2 parameters to the stored procedure and receive 2 parameters back. Also, I used ADODB connection to execute the sql.

« previous php.notes (#197068) next »