RE: NUMERIC type makes trouble in MS Access

Danny Severns <[email protected]> Sun, 27 May 2018 19:35:53 +0000
Newsgroups gmane.comp.db.postgresql.odbc
Message-ID <DF57AD6C522A1C44BBD0A37427EABF923E6F8E32@JANDC000-MBN05.ventech.com>
Don't know if this helps, and I know almost nothing about Access, but I found this in the MS Docs, https://docs.microsoft.com/en-us/sql/odbc/microsoft/microsoft-access-data-types?view=sql-server-2017.



The following table shows the Microsoft Access data types (Col 1), data types used to create tables (Col 2), and ODBC SQL data types (Col 3).
NUMBER (FieldSize= SINGLE)

SINGLE

SQL_REAL

NUMBER (FieldSize= DOUBLE)

DOUBLE

SQL_DOUBLE

NUMBER (FieldSize= BYTE)

UNSIGNED BYTE

SQL_TINYINT

NUMBER (FieldSize= INTEGER)

SHORT

SQL_SMALLINT

NUMBER (FieldSize= LONG INTEGER)

LONG

SQL_INTEGER

NUMERIC

NUMERIC

SQL_NUMERIC




From this it appears the Access datatype NUMBER would have to have a qualifier when declared and used to CREATE a table, in order to know to which datatype it would need to be converted when pulled from PG and inserted into Access.  But I certainly may not have understood your problem correctly.



HTH

Danny



-----Original Message-----
From: Tobias Wendorff <[email protected]>
Sent: Sunday, May 27, 2018 11:36 AM
To: Jan Wieck <[email protected]>
Cc: Inoue, Hiroshi <[email protected]>; [email protected]
Subject: Re: NUMERIC type makes trouble in MS Access



Am So, 27.05.2018, 05:18 schrieb Jan Wieck:

> Anything that is exact precision in the database should never be

> handled as "double" in any driver. That is a serious bug and a

> possible violation of accounting laws in many countries.



So SQL_NUMERIC is DOUBLE? Sorry, I'm not an insider ;)



Access supports DECIMAL file type with a range from -9.999... x 10^27 to +9.999... x 10^27 while DOUBLE goes from -1.797 x 10^308 to

1.797 x 10^308.



Actually, older Access had problems with DECIMAL fields in the past, maybe those got fixed already?



Best regards,

Tobias