RE: PHP 4.0 Bug #5458 Updated: odbc_prepare crashes calling MSSQL stored procedures
| From: | Santiago Holgado | Date: | Mon, 23 Oct 2000 07:40:10 +0000 |
| Subject: | RE: PHP 4.0 Bug #5458 Updated: odbc_prepare crashes calling MSSQL stored procedures | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35843@lists.php.net to get a copy of this message | ||
Sorry, but I no longer use PHP due to poor coverage of ODBC.
However, problem should still exist unless you've added some functionality that allows pointing
in which direction each parameter goes. Since you took every parameter as input, you cannot make
output or return parameters. You should allow to define which direction every parameter goes
> -----Mensaje original-----
> De: Bug Database [mailto:php-dev@lists.php.net]
> Enviado el: Sunday, October 22, 2000 11:39 AM
> Para: santiago.holgado@telesoft.es
> Asunto: PHP 4.0 Bug #5458 Updated: odbc_prepare crashes calling MSSQL
> stored procedures
>
>
> ID: 5458
> Updated by: dbeu
> Reported By: santiago.holgado@telesoft.es
> Status: Feedback
> Bug Type: ODBC related
> Assigned To:
> Comments:
>
> does the problem still exist with 4.0.3pl1?
>
> Previous Comments:
> ------------------------------------------------------------------
> ---------
>
> [2000-07-08 14:09:33] santiago.holgado@telesoft.es
> PHP 4.0.1pl2 Win32 CGI (the one in php.net) under IIS4 I'm using
> ODBC support to access MS SQL Server databases by querying stored
> procedures. The way to call those is the next one: {CALL
> sp(param1, param2)} written into {}. The following code (and
> similar calls) worked in PHP 3.0.16, but now the following
> sentence if (($Resultset = odbc_prepare($Conexion, "{CALL
> chkUserName(?)}")) == false) { die("Error"); } ends with
> a Fatal: emalloc() Replacing ? with a parameter works fine. I
> will also point that the automatic parameter binding done in
> odbc_execute, causes that I can't return values using parameters
> {? = CALL sp(?,?)} This is a valid SQL Server sentence which
> allows returning a code, and it's done by binding a parameter
> using OUTPUT or RETURN instead of INPUT. I remember also that the
> parameter binding done only binded strings (that was PHP 3.0.16)
> As pointed in another bug, I'll recomend adding a
> odbc_bindparameter function with 4 params: prepared statement,
> argument, sql data type, input/output. Parameter order can be
> checked with Microsoft documentation.
>
> ------------------------------------------------------------------
> ---------
>
>
> Full Bug description available at: http://bugs.php.net/?id=5458
>