php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2938 Intermittent Memo fields with Acces 97
Submitted: 1999-12-08 20:55 UTC Modified: 2001-02-10 15:35 UTC
From: arunas at anm dot org Assigned: kara (profile)
Status: Closed Package: ODBC related
PHP Version: 3.0.12 and 4b3 OS: Win NT 4.0 SP 6
Private report: No CVE-ID: None
 [1999-12-08 20:55 UTC] arunas at anm dot org
Many people have reported problems with Access 97, ODBC and PHP 3.0.12.  

I had some problems too, and so I carefully set:

odbc_longreadlen($ResID, 4096);
odbc_binmode($ResID,ODBC_BINMODE_CONVERT); 

And sometimes it worked...

Now I have found something that I can reproduce, it may require my database.  The following works (and returns several rows):

#############
$ConID = odbc_connect("Icons","","",SQL_CUR_USE_ODBC);
$query="SELECT I.Id, I.CommandID , " .
      " I.Preview as Preview, I.File , Remark " .
      " from Icon I "  . 
      " where I.CommandID = " . $CommandID;
$ResID = odbc_exec($ConID, $qury);
odbc_longreadlen($ResID, 4096);
odbc_binmode($ResID,ODBC_BINMODE_CONVERT); 

odbc_result_all($ResID);
#############

o Id is 32-bit int
o CommandID is 32-bit int
o Preview is Text(255)
o File is Text(200)
o Remark is Memo

If I change "I.File" to "I.File as IconFile" then it no longer works, that is, Remark doesn't come back, regardless of its position in the string.  In fact, odbc_result_all() simply aborts when it gets to the Remark field, only printing out the table header and all the fields in the first row up to Remark.  The content of the text and memo fields is so far pretty minimal, things like "Test" and "Hello?".

This is PHP running in CGI mode with Apache 1.3.9 and Mod_SSL, although I had simlar problems without SSL, so that certainly makes no difference.

Thanks for any light!

 - Arunas

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-11 17:06 UTC] arunas at anm dot org
Ok, I take it back, I mis-typed $query in my example. 

But the problem still exists.  I can get LONGTEXT fields, but it appears to be limited in that if the query string is too long - I don't get LONGTEXT fields.  In fact, there's not even a field_type.

I've had to split a few of my queries into multiple queries so that I can get memo fields.  It's very odd.  this is with the latest MDAC installed on NT 4.0, this means that the Access ODBC drivers are now version 4.0 something.

- Arunas
 [1999-12-17 14:45 UTC] arunas at anm dot org
I downloaded the Win32 binary of PHP 4b3, and I experienced the same problem, plus another crash so I changed back to 3.0.12.


 [2000-01-16 05:22 UTC] kara at cvs dot php dot net
Need more info on this one. It would help to get an SQL Trace.
 [2000-01-16 13:29 UTC] arunas at anm dot org
I have a SQL trace, it's 50 KB, where would you like it?
 [2000-02-16 01:23 UTC] arunas at anm dot org
Ok, now I'm using 3.0.14, and I think I've managed to get the problem to go away by using SQL_CUR_USE_DRIVER rather than SQL_CUR_USE_ODBC

I'm holding my breath.
 [2001-02-10 15:35 UTC] jimw@php.net
hope you're not still holding your breath.

closing old bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC