|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-06 16:48 UTC] sniper@php.net
[2006-01-06 23:58 UTC] eaboyle at gemstonewd dot com
[2006-01-07 00:22 UTC] sniper@php.net
[2006-01-14 15:45 UTC] none at none dot com
[2006-01-14 17:54 UTC] fmk@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
Description: ------------ I'm trying to get output from an mssql stored procedure. I get "mssql_bind(): Unable to set parameter warning on line 6. I have "allow_call_time_pass_reference = On" in my php.ini. Reproduce code: --------------- 1 $db = new clsDBsqlRags(); 2 $db->connect(); 3 $stmt=mssql_init("sp_NEXT_ACT_NUM ",$db->Link_ID); 4 $act_base = 1; 5 mssql_bind($stmt,"@ACT_BASE", $act_base, SQLINT4); 6 mssql_bind($stmt, "RTNVAL", &$act_num, SQLINT4); 7 8 $result=mssql_execute($stmt, FALSE); Stored procedure: CREATE PROCEDURE sp_NEXT_ACT_NUM @ACT_BASE int AS DECLARE @Act int --FETCHED CLIENT.ACCOUNT VALUE --GET SET OF ACCOUTS FROM CLIENT TABLE DECLARE Crsr_Act CURSOR FOR SELECT C.ACCOUNT FROM CLIENT C WHERE C.ACCOUNT >= @ACT_BASE ORDER BY ACCOUNT OPEN Crsr_Act FETCH Crsr_Act INTO @Act --TRAVERSE Crsr_Act WHILE (@@FETCH_STATUS = 0) BEGIN IF @ACT_BASE < @Act BREAK ELSE IF @ACT_BASE = @Act SELECT @ACT_BASE = @ACT_BASE + 1 FETCH Crsr_Act INTO @Act END CLOSE Crsr_Act DEALLOCATE Crsr_Act RETURN @ACT_BASE GO Expected result: ---------------- expect $act_num to be set to the return value of the mssql stored procedure. Actual result: -------------- mssql_bind(): Unable to set parameter warning on line 6.