php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10073 ODBC MS ACCESS and field size
Submitted: 2001-03-29 23:45 UTC Modified: 2001-04-16 22:44 UTC
From: shazlista at usa dot net Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.4pl1 OS: windowsNT/2k
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shazlista at usa dot net
New email:
PHP Version: OS:

 

 [2001-03-29 23:45 UTC] shazlista at usa dot net
for some reason, in ms access and mdac_typ.exe 2.6 on winnt or win2k, if you try to exec query that has operation on more than 1 text field, it returns huge field size which prevents the script from executing.
ex.

$q="select firstName + ' ' + LastName from Students";
odbc_exec($c,$q);

// if you trace the odbc function calles:
call SQLColAttributes with <SQL_COLUMN_DISPLAY_SIZE>
returns
SQLColAttributes  with return code 0 (SQL_SUCCESS)
         SQLLEN *            0x0012F568 (2147483598)

so php_odbc.c in php4dll will assume that this field requires (2GB ) memory hence exits with error.
It seems like it is an odbc bug but php engine should be aware and not exceed max size limit(say 65k or be defined in the ini/conf file) for a field.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-16 22:44 UTC] kalowsky@php.net
i am unable to reproduce this in the latest cvs builds.  your sample script executes fine.  please check the latest 4.0.5 RC or the latest CVS.  if this is still valid please re-open the bug (change it's status).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 21:01:30 2024 UTC