ID: 37877
User updated by: jr at johnrule dot com
Reported By: jr at johnrule dot com
-Status: Bogus
+Status: Open
Bug Type: *Database Functions
Operating System: xp
PHP Version: 4.4.2
New Comment:
The examples have typo's by the way...but the 'theory' is correct.
Previous Comments:
------------------------------------------------------------------------
[2006-06-22 19:35:35] jr at johnrule dot com
Note:
This is not about 'retrieving' data, or limits for data fields, this is
about a limit in executing SQL statements directly through a
COM(ADODB.Connection) to an Access .mdb file.
Example:
INSERT INTO users (first_name, last_name, address, city, state, zip,
username, password) VALUES ('Jonathan', 'Macintyre the 3rd', '123456789
Somewhere in the United States', 'Idaho', 'ID', '12345-12345',
'jonathanmacintyrethe3rd','thisismypassword')
The above command will fail because it is greater than 255 chars.
The command below will succeed however, using the exact same type of
connection:
INSERT INTO users (fname, lname, address, city, state, zip) VALUES
('Jon', 'Mac', '123 US St.', 'Idaho', 'ID', '12345','jmac','1234')
Do you see what I mean? This is the same limitation imposed if you try
to create a module in Access with a 'RunSQL' command as the
parameter...the field is limited to 255 chars.
However, the first command greater than 255 chars will succeed if you
connect through an ODBC (DSN) connection. I am not sure whose
limitation this is at this point? Since php is making the connection
and call to both, I was guessing that this is a php problem.
------------------------------------------------------------------------
[2006-06-22 19:04:08] [EMAIL PROTECTED]
Duplicate of bug #37757.
------------------------------------------------------------------------
[2006-06-21 17:48:51] jr at johnrule dot com
Description:
------------
An 'INSERT' command with more than 255 characters will fail when using
COM and an ADODB.Connection (i.e. a direct connection to an access.mdb
file). However, the command will succeed if you connect through an ODBC
connection to the same file. This would prove that the limitation is not
a part of the file itself, but a part of the functionality of the
interface...wouldn't it?
I tested this on PHP 4 and 5 with the same results:
Apache 2
PHP (4 or 5)
Windows XP
Reproduce code:
---------------
Just try to do an 'INSERT' command with more than 255 characters in it.
It works on an Access.mdb file through a System DSN (ODBC) but it fails
when using COM and ADODB.Connection (i.e. a direct connection to the
file).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37877&edit=1