Bug #72503 [NEW]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
From: jgeert1 at its dot jnj dot com
Operating system: Windows Server 2008 R2
PHP version: 5.6.23
Package: ODBC related
Bug Type: Bug
Bug description:[ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
Description:
------------
I'm currently running PHP 5.5.12 and use the odbc functions to
retrieving data from MS SQL Server databases. I've a query which runs
fine (produces the expected result)when using this PHP version.
However I would like to upgrade PHP from 5.5.12 to 5.6.23. Installation
went smoothly and all existing code seems to run fine on it except one
db query, which now produces the error "[ODBC Cursor Library] Result set
was not generated by a SELECT statement, SQL state SL004 in SQLGetData
...".
I've no idea what's causing it. It runs fine when using the old version
of PHP, but with the latest one, it always fails. I also tried PHP
7.0.8, but it also produces the same error.
Test script:
---------------
$odbcmgt_dsn = "Driver={SQL
Server};Server=MYSERVER;Database=MYDATABASE;";
$dbhandle =
odbc_connect($odbcmgt_dsn,$odbcmgt_user,$odbcmgt_pwd,SQL_CUR_USE_ODBC);
$result = odbc_exec($dbhandle, $sql);
while( $row = odbc_fetch_array($result)) {
// data procession code
}
odbc_free_result($result);
odbc_close($dbhandle);
Expected result:
----------------
+/- 6000 rows of data
Actual result:
--------------
Error message: Warning: odbc_fetch_array(): SQL error: [Microsoft][ODBC
Cursor Library] Result set was not generated by a SELECT statement, SQL
state SL004 in SQLGetData in ....
--
Edit bug report at https://bugs.php.net/bug.php?id=72503&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72503&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72503&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72503&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72503&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72503&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72503&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72503&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72503&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72503&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72503&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72503&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72503&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72503&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72503&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72503&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72503&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72503&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72503&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72503&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72503&r=mysqlcfg
Thread (9 messages)
- jgeert1 at its dot jnj dot com
- jgeert1 at its dot jnj dot comBug #72503 [Com]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- ab@php.netBug #72503 [Opn->Fbk]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- jgeert1 at its dot jnj dot comBug #72503 [Fbk->Opn]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- ab@php.netBug #72503 [Opn->Nab]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- ab@php.netBug #72503 [Nab]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- jgeert1 at its dot jnj dot comBug #72503 [Nab]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- ab@php.netBug #72503 [Nab]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s
- jgeert1 at its dot jnj dot comBug #72503 [Nab]: [ODBC Cursor Library] Result set was not generated by a SELECT statement, SQL s