#30899 [Opn->Bgs]: Can't execute a stored procedure
| From: | sniper@php.net | Date: | Wed, 15 Dec 2004 01:48:05 +0000 |
| Subject: | #30899 [Opn->Bgs]: Can't execute a stored procedure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70252@lists.php.net to get a copy of this message | ||
ID: 30899
Updated by: sniper@php.net
Reported By: acgouveia at refertelecom dot pt
-Status: Open
+Status: Bogus
Bug Type: ODBC related
Operating System: Windows Server 2000
PHP Version: Irrelevant
New Comment:
1. Too old version. (we're at 4.3.9 atm!)
2. similar reports exist already, add comments to those
Previous Comments:
------------------------------------------------------------------------
[2004-11-25 18:21:48] acgouveia at refertelecom dot pt
Description:
------------
I use PHP statement odbc_do($conn, "EXECUTE
RTSVR3.master.dbo.xp_cmdshell 'dtsrunui /S RTSVR3 /U sa /P mdbadm /N
DTS_Carrega_Fich_TAC /A var=123'") to call stored procedure on MSSQL
2000 server, which execute a data transformation service.
When I use this SQL command directly on SQL Query Analyser, it works.
However, via PHP doesn't work, gives the following error:
"Warning: odbc_do(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL
Server]A server cursor is not allowed on a remote stored procedure or
stored procedure with more than one SELECT statement. Use a default
result set or client cursor., SQL state 37000 in SQLExecDirect in..."
I found this problem on PHP version 4.3.4.
Can you tell me, what is wrong? Is it PHP bug or mistake in PHP/Apache
configuration?
Thanks.
Reproduce code:
---------------
$sql="EXECUTE RTSVR3.master.dbo.xp_cmdshell 'dtsrunui /S RTSVR3 /U sa
/P mdbadm /N DTS_Carrega_Fich_TAC /A sessao=".session_id()."'";
odbc_do($conn, $sql);
Expected result:
----------------
Call stored procedure on MSSQL 2000 server, which execute a data
transformation service.
Actual result:
--------------
"Warning: odbc_do(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL
Server]A server cursor is not allowed on a remote stored procedure or
stored procedure with more than one SELECT statement. Use a default
result set or client cursor., SQL state 37000 in SQLExecDirect in..."
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30899&edit=1