Bug #1416 Cannot view rows with MS Access having large unsigned iteger values
Submitted: 27 Sep 2003 11:59 Modified: 30 May 2013 8:17
Reporter: Harry Clauson Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.06 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: ODBC5-RC

[27 Sep 2003 11:59] Harry Clauson
I am using Access 97 sr2 on Windows XP to access Mysql tables on my SCO Unix Server.  I am simply linking to the tables and browsing with Access.  Everything works fine except for rows with unsigned integer columns (TINYINT or SMALLINT) that have large values in them (i.e. >127 for TINYINT or >32,767 for SMALLINT).  These rows are displayed by Access with "#Deleted" in all columns.

My guess is these values are not being handled correctly due to the high order (sign) bit being set.  I notice that TINYINT is converted to Integer in Access whereas Byte would be sufficient.  I would expect that SMALLINT unsigned values greater than 32,767 would appear as negative values in Access because the Integer type is signed and is not big enough to represent the true unsigned value.  This could be avoided by up-converting unsigned SMALLINT fields to Long Integers in Access.  Either way would be acceptable as long as the values can be retrieved.

Thank you for your assistance!

How to repeat:
Below is my sql to create two tables with this problem, one with an unsigned TINYINT and the other unsigned SMALLINT.  I just link to the tables with Access and open them in Datasheet view.  Access displays all fields in rows 128 & 32768 with "#Deleted" instead of the proper values.

drop table if exists uint8;
create table uint8 (
        uint8 tinyint unsigned not null,
        descr char(25) binary not null,
        primary key (uint8)
insert into uint8 set uint8=127,descr='works fine';
insert into uint8 set uint8=128,descr='shows #deleted';

drop table if exists uint16;
create table uint16 (
        uint16 smallint unsigned not null,
        descr char(25) binary not null,
        primary key (uint16)
insert into uint16 set uint16=32767,descr='works fine';
insert into uint16 set uint16=32768,descr='shows #deleted';
[2 Oct 2003 21:28] MySQL Verification Team
Are you tried to use the MyODBC option:

Change BIGINT columns to INT ?
[30 May 2013 8:17] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.