note 93546 added to function.mssql-execute
| From: | vitali at lumensoftware dot com | Date: | Tue, 15 Sep 2009 20:10:51 +0000 |
| Subject: | note 93546 added to function.mssql-execute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160591@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 64.71.164.2
Probable Submitter: 67.52.217.50
----
Manual Page -- http://www.php.net/manual/en/function.mssql-execute.php
Edit -- https://master.php.net/note/edit/93546
Del: integrated -- https://master.php.net/note/delete/93546/integrated
Del: useless -- https://master.php.net/note/delete/93546/useless
Del: bad code -- https://master.php.net/note/delete/93546/bad+code
Del: spam -- https://master.php.net/note/delete/93546/spam
Del: non-english -- https://master.php.net/note/delete/93546/non-english
Del: in docs -- https://master.php.net/note/delete/93546/in+docs
Del: other reasons-- https://master.php.net/note/delete/93546
Reject -- https://master.php.net/note/reject/93546
Search -- https://master.php.net/manage/user-notes.php