Menu

#102 Negative numbers when MAX_LIMIT reached

Unassigned
wont-fix
nobody
None
2
2014-06-08
2014-02-24
No

I have found the following bug:

Column col = myTable.getColumn("id");
DataType dataType = col.getType(); //returns LONG type
Long l = new Long("2147483648"); //off by one to 2^32-1 Integer limit
myTable.addRow(l, "TEST");

the number inserted is -2147483648.

I tried setting a bigger length with:

col.setLength(new Short("64"));

I have the perception that Jackcess should not insert number larger than what it can handle.
I also opened a help question for a related problem.

Discussion

  • James Ahlborn

    James Ahlborn - 2014-02-25

    As i noted in your forum question, an access database "long integer" is a Java Integer. So the value you provided is outside the valid range, hence the overflow.

     

    Last edit: James Ahlborn 2014-02-25
  • James Ahlborn

    James Ahlborn - 2014-02-25
    • status: open --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB