Bug #26166 | ADO returns data type values for TinyInt (16,17) instead Boolean (11) | ||
---|---|---|---|
Submitted: | 7 Feb 2007 22:31 | Modified: | 8 Feb 2007 13:47 |
Reporter: | Rick Duke | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 3.51 | OS: | Windows (XP) |
Assigned to: | CPU Architecture: | Any | |
Tags: | ADO Boolean TinyInt |
[7 Feb 2007 22:31]
Rick Duke
[8 Feb 2007 13:44]
Bogdan Degtyariov
Rick, Thanks for your bug report. However, I must admit that this is expected behavior of MySQL/MyODBC as the definition TINYINT(1) doesn't mean that the appropriate column can take just two values such as 0 or 1 (False or True). MySQL allocates 1 byte for this column. This means that such columns can take the range of -127..127 and 0..255 for signed and unsigned types accordingly. Although I do not consider such work of MyODBC as a bug, it is interesting for me what is the name of the type identifier (16 or 17) returned by MyODBC. I was unable to find any correspondence in Microsoft header files. Accordingly to them SQL_TINYINT is (-6), SQL_C_TINYINT is (-26).