odbc_fetch_*() fails to fetch SQL Server text fields with SQL_CUR_USE_ODBC
オープン
@cmb69 がすでに取り組んでいます。
2024年8月5日 から。
Bug
Extension: odbc
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
The following code:
$conn = odbc_connect('DRIVER={SQL Server Native Client 11.0};SERVER=LOCALHOST\SQLSERVER;DATABASE=OIDPLUS;charset=UTF-8;Client_CSet=UTF-8;Server_CSet=UTF-8', 'sa', '123456', SQL_CUR_USE_ODBC);
$res = odbc_exec($conn, "select description from my_objects");
while ($row = odbc_fetch_object($res)) {
var_dump($row);
}
echo odbc_close($conn);
Resulted in this output:
(Nothing; odbc_fetch_object is false)
But I expected this output instead:
Printed array with descriptions
The bug only happens if odbc_connect() has SQL_CUR_USE_ODBC and it ONLY fails if you fetch exactly one column with the text data type. If you fetch a text row and another row, then it works!
select description from my_objectsdoes NOT workselect id, description from my_objectsWORKSselect id from my_objectsWORKS
System:
- Windows 10 Pro
- SQL Server 2022
PHP Version
PHP 8.3.6 (also tested with PHP 8.4 Alpha 4)
Operating System
Windows 10 x64
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。