Bug #13783 Updated: odbc_fetch_into different issue

From: Date: Tue, 23 Jul 2002 15:29:06 +0000
Subject: Bug #13783 Updated: odbc_fetch_into different issue
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14895@lists.php.net to get a copy of this message
ID: 13783 Updated by: kalowsky@php.net Reported By: Grant.Walters@walters.co.nz -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: SCO Openserver 5.0.5 & RH Lnux 7 PHP Version: 4.0.6 Assigned To: ahill New Comment: setting to feedback until further notice is given by end user. Previous Comments: ------------------------------------------------------------------------ [2002-06-25 15:55:20] Grant.Walters@walters.co.nz I have moved onto latest versions of RH, Openlink and PHP. Testing resumes at the end of next week. ------------------------------------------------------------------------ [2002-06-24 22:51:36] kalowsky@php.net Can you please try a more recent release? All my local testing has proven to be successful using iODBC. If upgrading to a newer version doesn't work, can you please provide a simplified version of your sample script to reproduce this? ------------------------------------------------------------------------ [2001-10-24 05:13:29] Grant.Walters@walters.co.nz A correction to my previous information: The piece I commented out was in the php_opdbc.h file and was a reference to iodbc.h. This file is not present in the Openlink V4.1 ODBCSDK. I am unable to determine exactly which version of the SDK is being used as the Openlink ODBCSDK files have no version numbers anywhere. I have just finished testing against the SDK I downloaded with Openlink 3.2 bits. The odbc_fetch_into($results,$pos,$row) code works with both odbc_do and odbc_prepare statements, so it must be something to do with the new 4.1 SDK. ------------------------------------------------------------------------ [2001-10-23 22:45:46] Grant.Walters@walters.co.nz Sorry about the last post. It is a different issue that I haven't raised yet. Can someone remove it. ------------------------------------------------------------------------ [2001-10-23 22:43:01] Grant.Walters@walters.co.nz A correction to my previous information: The piece I commented out was in the php_opdbc.h file and was a reference to iodbc.h. This file is not present in the V4 ODBCSDK. I am unable to determine exactly which version of the SDK is being used as the Openlink ODBCSDK files have no version numbers anywhere. However.... I have gone back to what I had with the Openlink 3.2 drivers (and put back the iodbc.h line). The same thing happens regarding the sql query containing a ('). However.... The Openlink team suggested a series of changes including using odbc_prepare. Using 3.2 and 4.1 the following works. $sql="SELECT ID,Category,description FROM card_type WHERE description=?"; $results = odbc_prepare($conn,$sql); $parms=array("PEPPERELL'S"); odbc_execute($results,$parms); if ($results) { while (odbc_fetch_into($results,$row)) { echo $row[0]." ".$row[1]." ".$row[2]."<BR>"; } } I still think it has to be a bug with on the PHP side to do with how PHP parses the $sql contents, that is resulting in a syntax error in the SQL statement passed to Openlink. According to the Microsoft ODBC SDK, error 37000 is remapped to 42000 which says: 42000: *StatementText contained an SQL statement that was not preparable or contained a syntax error. The user did not have permission to execute the SQL statement contained in *StatementText. This is definitely not a permission issue. Openlink alse mentioned changes to disable the use of DYNAMIC_CURSOR. As I currently can make the queries I need (so far), I will carry on with what I have. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/13783 -- Edit this bug report at http://bugs.php.net/?id=13783&edit=1

« previous php.bugs (#14895) next »