note 93938 added to function.mssql-execute

From: Date: Wed, 07 Oct 2009 16:39:30 +0000
Subject: note 93938 added to function.mssql-execute
Groups: php.notes 
Request: Send a blank email to php-notes+get-161476@lists.php.net to get a copy of this message
Regarding the "stored procedure execution failed" errors mentioned in previous posts -- in addition to using the data source name as defined in freetds.conf under Linux, you may encounter this error when attempting to call a stored procedure after running a standard query with mssql_query() Call mssql_free_result() before executing the stored procedure with mssql_execute() to clear this up. <?php $conn = mssql_connect($host, $user, $pass); mssql_select_db('somedb', $conn); // Call a simple query $result = mssql_query('SELECT * FROM sometable', $conn); // Release the result resource mssql_free_result($result); // Then execute the procedure $proc = mssql_init('some_proc', $conn); $proc_result = mssql_execute($proc); // Etc... mssql_free_statement($proc); ?> ---- Server IP: 208.69.120.35 Probable Submitter: 160.94.15.144 ---- Manual Page -- http://www.php.net/manual/en/function.mssql-execute.php Edit -- https://master.php.net/note/edit/93938 Del: integrated -- https://master.php.net/note/delete/93938/integrated Del: useless -- https://master.php.net/note/delete/93938/useless Del: bad code -- https://master.php.net/note/delete/93938/bad+code Del: spam -- https://master.php.net/note/delete/93938/spam Del: non-english -- https://master.php.net/note/delete/93938/non-english Del: in docs -- https://master.php.net/note/delete/93938/in+docs Del: other reasons-- https://master.php.net/note/delete/93938 Reject -- https://master.php.net/note/reject/93938 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#161476) next »