Skip to content

[BUG] Error returning negative smallint columns. #127

Description

@epligrow

Describe your system

  • odbc Package Version: 2.3
  • ODBC Driver: IBM i Access ODBC Driver
  • Database OS: DB2
  • Node.js Version: v10.16.3
  • Node.js OS: IBM i v7.3

Describe the bug
While running a select on a smallint column containing negative numbers, the following error appeared. The value of Column 26 in the error shown is -13, but this happens on any negative smallint regardless of column. Current workaround is casting the smallint as a regular int in the query.
Error Image

Expected behavior
The select statement should return the negative number, as it is within the limit of a signed smallint. The column returns properly in other ODBC-based database management systems.

To Reproduce
Run any select query returning a negative smallint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions