|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-06-21 17:48 UTC] 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). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 19:00:02 2025 UTC |
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.