# bug in odbc extension http://bugs.php.net/bug.php?id=40695

- Thread: https://externals.io/message/32423
- Original archive: https://news-web.php.net/php.internals/32423
- Started by Alexandra S. on 2007-09-23T10:02:05+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #32423 — Alexandra S. — 2007-09-23T10:02:05+00:00

URL: https://externals.io/message/32423#32423

Hi,

I am attaching here a small patch for this bug. The original error for 
the reproduction script in this bug was:

*Warning*: odbc_execute() [function.odbc-execute <http://10.1.2.195/function.odbc-execute>]: SQL error: [Microsoft][ODBC 
Microsoft Access Driver]COUNT field incorrect , SQL state 07001 in SQLExecute in *C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs\odbc2.php* on line *33

This is not the right error. since we did not check the return codes from SQLDescribeParam php_odbc.php:1000
we did not see that the real error is:

**Warning*: odbc_execute() [function.odbc-execute <http://10.1.2.195/function.odbc-execute>]: SQL error: [Microsoft][ODBC 
Driver Manager] Driver does not support this function, SQL state IM001 in hello - SQL_ERROR in *C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs\odbc2.php* on line *33

Please review the patch

Alexandra Shpindovsky

---

## #32441 — Dmitry Stogov — 2007-09-25T07:08:00+00:00

URL: https://externals.io/message/32423#32441 · In reply to: #32423

Hi Alexandra,

In general the patch looks fine.
Is it possible to write an automatic test with proper --SKIPIF-- condition
for this fix?

Thanks. Dmitry.

> -----Original Message-----
> From: Alexandra S. [mailto:alexandra@zend.com] 
> Sent: Sunday, September 23, 2007 2:02 PM
> To: internals@lists.php.net
> Subject: [PHP-DEV] bug in odbc extension 
> http://bugs.php.net/bug.php?id=40695
> 
> 
> 
> Hi,
> 
> I am attaching here a small patch for this bug. The original 
> error for 
> the reproduction script in this bug was:
> 
> *Warning*: odbc_execute() [function.odbc-execute 
> <http://10.1.2.195/function.odbc-execute>]: SQL error: 
> [Microsoft][ODBC 
> Microsoft Access Driver]COUNT field incorrect , SQL state 
> 07001 in SQLExecute in *C:\Program Files\Apache Software 
> Foundation\Apache2.2\htdocs\odbc2.php* on line *33
> 
> This is not the right error. since we did not check the 
> return codes from SQLDescribeParam php_odbc.php:1000 we did 
> not see that the real error is:
> 
> **Warning*: odbc_execute() [function.odbc-execute 
> <http://10.1.2.195/function.odbc-execute>]: SQL error: 
> [Microsoft][ODBC 
> Driver Manager] Driver does not support this function, SQL 
> state IM001 in hello - SQL_ERROR in *C:\Program Files\Apache Software 
> Foundation\Apache2.2\htdocs\odbc2.php* on line *33
> 
> Please review the patch
> 
> Alexandra Shpindovsky
