php-src/ext/pdo_odbc
Christoph M. Becker f5aaa8f187
Fix GH-9372: HY010 when binding overlong parameter
If `SQLPutData()` *fails*, we should not call `SQLParamData()` again,
because that yields the confusing `HY010` (Function sequence error).
Instead we properly handle `SQLPutData()` errors.

For the given case (paramter length > column length), some drivers let
`SQLPutData()` fail, while others do not.  Either behavior seems to
conform to the ODBC specification.  Anyhow, we do not want to silently
truncate the given parameter, since that would break the behavior for
drivers which do not fail, but still don't simply truncate the given
parameter.  So it is finally up to userland to avoid passing overlong
parameters – with this patch they at least get useful information about
the actual issue.

Closes GH-9541.
2022-10-19 11:37:05 +02:00
..
tests Fix GH-9372: HY010 when binding overlong parameter 2022-10-19 11:37:05 +02:00
config.m4 Remove conditional calls of always available macros 2019-07-14 22:24:21 +02:00
config.w32
CREDITS
odbc_driver.c Fix GH-9347: Current ODBC liveness checks may be inadequate 2022-08-29 18:32:31 +02:00
odbc_stmt.c Fix GH-9372: HY010 when binding overlong parameter 2022-10-19 11:37:05 +02:00
pdo_odbc.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_pdo_odbc.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_pdo_odbc_int.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00