Voting

: seven plus two?
(Example: nine)

The Note You're Voting On

marco
17 years ago
we faced the 31 char limit using cakephp dbo_odbc.php class (version 1.1.18.5850)

at the end, it calls odbc_fetch_row giving the problem (i tracked it may be due to the php implementation of a ODBCv2 model, which has hard coded 4bytes, 32 bits file names length, while ODBCv3 seems to have a separate specification of that value, fwiw)

we learned from another user (having similar problems with dbo_mssql.php class) how to workaround this problem,

we solved using inheritance, redefining the method (locally to our application) in order to
- create a "map" of the query fields (as an array) before executing it
- execute the query in a non-associative way
- after the results are returned, restore the real field names applying the previous created "map"

another way could be use the COM like:
new COM("ADODB.Connection")
which does not show the 31 chars problem but it could be slower and bound to the windows platform.

<< Back to user notes page

To Top