From: rvest at policytech dot com
Operating system: Windows XP Professional
PHP version: 5.1.2
PHP Bug Type: ODBC related
Bug description: Executing SQL directly; no cursor error
Description:
------------
I ran a query against a Microsoft SQL Server 2005 through ODBC. It is a
DNSless connection using the Native Client for Microsoft SQL Server 2005.
I am using the SQL_CUR_USE_DRIVER cursor in the odbc_pconnect function. I
get the error "Executing SQL directly; no cursor." when using the
odbc_exec function.
Actual result:
--------------
[17-Feb-2006 14:18:19] VERSION: 4.000.5
REFERER: http://localhost/Content_Redirect.php?Section=Home
SCRIPT_NAME: /c_Home/index.php
SCRIPT_FILENAME: C:\vestws\bin\c_Home\index.php
ERROR NUMBER: 1024
BROWSER: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
2.0.50727)
System: Windows NT REBECCA 5.1 build 2600
FILE: C:\vestws\bin\includes\inc_db.php
LINE: 1533
ERROR: [Microsoft][SQL Native Client][SQL Server]Executing SQL directly;
no cursor.
BACKTRACE:
---------------------
#0 errHand(1024, [Microsoft][SQL Native Client][SQL Server]Executing SQL
directly; no cursor., C:\vestws\bin\includes\inc_db.php, 1533, Array
([type] => 97,[msg] => [Microsoft][SQL Native Client][SQL Server]Executing
SQL directly; no cursor.,[ex] => DBException Object ([] => Array ([dbHost]
=> rebecca\sqlexpress,[dbType] => 2005_mssql,[dbName] =>
wksp4_0,[dbUsername] => sa,[dbPass] => imagin,[dbPort] =>
3268,[dbFilename] => ,[mysql_usetransactions] => ,[use16BitChars] => ),[]
=> [Microsoft][SQL Native Client][SQL Server]Executing SQL directly; no
cursor.,[] => Resource id #24,[] => 97,[] => [Microsoft][SQL Native
Client][SQL Server]Executing SQL directly; no cursor.,[] => ,[] => 97,[]
=> C:\vestws\bin\includes\inc_db.php,[] => 1527,[] => Array ([0] => Array
([file] => C:\vestws\bin\includes\inc_db.php,[line] => 439,[function] =>
throwError,[class] => DB,[type] => ->,[args] => Array ([0] => 97,[1] =>
[Microsoft][SQL Native Client][SQL Server]Executing SQL directly; no
cursor.)),[1] => Array ([file] => C:\vestws\bin\includes\inc_db.php,[line]
=> 226,[function] => _Execute,[class] => DB,[type] => ->,[args] => Array
([0] => SELECT GroupID, GroupName FROM xUsersPermissions INNER JOIN Groups
ON Groups.Group = xUsersPermissions.GroupID AND Groups.GroupName <> ''
WHERE PermissionCode = 'dca' AND UserID = 2,[1] => )),[2] => Array ([file]
=> C:\vestws\bin\c_home\index.php,[line] => 40,[function] =>
Execute,[class] => DB,[type] => ->,[args] => Array ([0] => SELECT GroupID,
GroupName FROM xUsersPermissions INNER JOIN Groups ON Groups.Group =
xUsersPermissions.GroupID AND Groups.GroupName <> '' WHERE PermissionCode
= 'dca' AND UserID = 2)))))) called at [(null):0]
#1 trigger_error([Microsoft][SQL Native Client][SQL Server]Executing SQL
directly; no cursor.) called at [C:\vestws\bin\includes\inc_db.php:1533]
#2 DB->throwError(97, [Microsoft][SQL Native Client][SQL Server]Executing
SQL directly; no cursor.) called at
[C:\vestws\bin\includes\inc_db.php:439]
#3 DB->_Execute(SELECT GroupID, GroupName FROM xUsersPermissions INNER
JOIN Groups ON Groups.Group = xUsersPermissions.GroupID AND
Groups.GroupName <> '' WHERE PermissionCode = 'dca' AND UserID = 2, )
called at [C:\vestws\bin\includes\inc_db.php:226]
#4 DB->Execute(SELECT GroupID, GroupName FROM xUsersPermissions INNER
JOIN Groups ON Groups.Group = xUsersPermissions.GroupID AND
Groups.GroupName <> '' WHERE PermissionCode = 'dca' AND UserID = 2) called
at [C:\vestws\bin\c_home\index.php:40]
--
Edit bug report at http://bugs.php.net/?id=36435&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36435&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36435&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36435&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36435&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36435&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36435&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36435&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36435&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36435&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36435&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36435&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36435&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36435&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36435&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36435&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36435&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36435&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36435&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36435&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36435&r=mysqlcfg