I am experiencing numeric conversion errors (040) when trying to read a date value into a numeric field from Postgres, writing it works fine.
As a test I changed the file variable to an alphanumeric in Pro-IV and found it returned non-displayable/control/funny characters followed by spaces.
E.g. I changed GA_NUMDATEGEN to an alphanumeric type and put the following code in after read:
UMSG("LEN[" + CONV(LEN(GA_NUMDATEGEN)) + "]" + CHAR(10) + "GA_NUMDATEGEN[" + GA_NUMDATEGEN + "]",-1) FOR #I = 1 TO LEN(GA_NUMDATEGEN) UMSG(CONV(#I) + " ORD=" + CONV(ORD(GA_NUMDATEGEN[#I,#I])),-1) ENDFOR
causes the following to be displayed:
LEN{8} GA_NUMDATEGEN{Note, no ending bracket above.
1 ORD=
2 (3 to 8 produces the same)
2 ORD=32
We contacted support and from their suggestions are testing different ODBC driver combinations, but I was wondering if someone here might have some insights.
Here is our test environment:
- Linux: 2.6.32-279.el6.x86_64
- Pro-IV 7.1.37.0-PR
- unixODBC: 2.2.14
- GA_KEY
- Type = AK
- Length = 8
- Ext. Format = ALPHA
- GA_NUMDATEGEN
- Type = N
- Length = 5
- Ext. Format = DATE
- Nullable = true.
create table GA_TEST ( GA_KEY char(8) not null default '' ,GA_NUMDATEGEN date ); create unique index IND_GA_TEST on GA_TEST( GA_KEY );