New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC MetaColumns method returns MetaType instead of ActualType #184

mnewnham opened this Issue Jan 3, 2016 · 1 comment


None yet
2 participants
Copy link

mnewnham commented Jan 3, 2016

When the metaColumns method is called, the ODBC driver, and other drivers that use it as a provider (including ACCESS) return the ADOdb metaType in the type field, instead of the actualType, as all other drivers.

Proposal 1
ODBC driver is modified to return actualType, and for backwards compatibility, add $metaColumnsReturnsMetaType flag
Proposal 2
All other drivers modified to return MetaType value, and for backwards compatibility, add $metaColumnsReturnsActualType flag
Proposal 3
MetaColumns() method is modified to return both actualtype and metatype with option to return either actualtype or metatype in type field,

@mnewnham mnewnham added the bug label Jan 3, 2016


This comment has been minimized.

Copy link

dregad commented Jan 5, 2016

Based on your description it sounds like the "normal" behavior is to return actualType so it probably makes sense to go for option 1, but I don't have a strong preference.

If there is a use case for letting the caller chose what type they want, then option 3 makes sense (but not sure how you were thinking to set the option, via a parameter, or a property ?).

Instead of using a boolean flag, maybe an generic $metaColumnsReturnType with related constants META / ACTUAL would be more clear.

mnewnham added a commit that referenced this issue Feb 21, 2016

MetaColumns method returned metaType instead of Actual Type, see #184 ,

The ODBC and Access drivers returned the MetaType of the field, instead of
the Actual Type like other drivers. This behaviour has been changed in V5.21,
to provide compatibility with other drivers. 

To provide backwards compatibility, an option can be set after the class has 
been instantiated - class::$metaColumnsReturnType = METACOLUMS_RTURNS_META, which changes the driver back to its old behaviour

@dregad dregad closed this in ca8afb7 Feb 24, 2016

@dregad dregad added this to the v5.21 milestone Feb 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment