Menu

BUG: "Currency" column created via UCanAccess may have precision of 8 instead of 100

2021-08-26
2021-08-27
  • Jefferson Poe

    Jefferson Poe - 2021-08-26

    UCanAccess version: 5.0.0
    JDK: 8 and 11 (tested on both)

    Steps to repro:
    1. create a new table that has a "Currency" type column: CREATE TABLE mytable1 (myID counter PRIMARY KEY, myCurrency currency)
    2. read the schema of the table using ResultSetMetadata of the following statement: SELECT * FROM mytable1 WHERE 1=0
    3. inspect the precision and display width of the "Currency" column

    Result:
    Sometimes, the created column will have precision = 8, and display size = 10
    Other times, the created column will have precision = 100, and display size = 102

    note: this seems to be tied to the creation process of the table. If a table was created directly in access, it will always be read as having precision = 100, and display size = 102. Repeated drop and recreation of a table will give inconsistent precision and display size for currency columns.

    more note:
    Moreover, this seems to be the an issue with the mirrored temporary database when creating the table via UCanAccess. Once the table is created, and the initial connection is terminated, subsequent schema reads of the same table will report the correct precision & display size.

     

    Last edit: Jefferson Poe 2021-08-26
    • Marco Amadei

      Marco Amadei - 2021-08-27

      Will look into, have you already tried directly with jackcess?

      Il Gio 26 Ago 2021, 21:04 Jefferson Poe jeffersonatsafe@users.sourceforge.net ha scritto:

      UCanAccess version: 5.0.0
      JDK: 8 and 11 (tested on both)

      Steps to repro:
      1. create a new table that has a "Currency" type column: CREATE TABLE
      mytable1(IDcounter PRIMARY KEY,currencycurrency)
      2. read the schema of the table using ResultSetMetadata of the following
      statement: SELECT * FROMmytable1WHERE 1=0
      3. inspect the precision and display width of the "Currency" column

      Result:
      Sometimes, the created column will have precision = 8, and display size =
      10
      Other times, the created column will have precision = 100, and display
      size = 102

      note: this seems to be tied to the creation process of the table. If a
      table was created directly in access, it will always be read as having
      precision = 100, and display width = 102. Repeated drop and recreation of a
      table will give inconsistent precision and display size for currency
      columns.


      BUG: "Currency" column created via UCanAccess may have precision of 8
      instead of 100
      https://sourceforge.net/p/ucanaccess/discussion/general/thread/669b58a9a6/?limit=25#8531


      Sent from sourceforge.net because amadei.mar@gmail.com is subscribed to
      https://sourceforge.net/p/ucanaccess/discussion/general/

      To unsubscribe from further messages, a project admin can change settings
      at https://sourceforge.net/p/ucanaccess/admin/discussion/forums. Or, if
      this is a mailing list, you can unsubscribe from the mailing list.

       

Log in to post a comment.