alexbrainman / odbc

odbc driver written in go
BSD 3-Clause "New" or "Revised" License
348 stars 139 forks source link

DB2 on Windows Server 2012 R2 connect but truncate data retreived #160

Open brunoeduardomachado opened 3 years ago

brunoeduardomachado commented 3 years ago

I have test it on windows Server 2012 R2 with this string "DRIVER=IBM i Access ODBC Driver;SYSTEM=db2databaseip;UID=db2User;PWD=db2pass", it works but truncate the data for example i retreive this data:

Field: 1 LHTINT 44741014921 Type: 1 Size: 21 Nil?: 0 Field: 2 LHTIST 0 Type: 1 Size: 2 Nil?: 0 Field: 3 LHTFEX 251 Type: 1 Size: 4 Nil?: 0 Field: 4 LHTICT 0000 Type: 1 Size: 6 Nil?: 0 Field: 5 LHTIVT 0 Type: 2 Size: 19 Nil?: 0 Field: 6 LHTIMO 84 Type: 1 Size: 3 Nil?: 0 Field: 7 LHTIUP OK Type: 1 Size: 2 Nil?: 0 Field: 8 LHTIRS 00 Type: 1 Size: 2 Nil?: 0 Field: 9 LHTOFI 0 Type: 2 Size: 8 Nil?: 0 Field: 10 LHTOHI 0 Type: 2 Size: 6 Nil?: 0 Field: 11 LHTOMI 0 Type: 2 Size: 3 Nil?: 0 Field: 12 LHTOFF 0 Type: 2 Size: 8 Nil?: 0 Field: 13 LHTOHF 0 Type: 2 Size: 6 Nil?: 0 Field: 14 LHTOMF 0 Type: 2 Size: 3 Nil?: 0 Field: 15 LHTOTO S Type: 1 Size: 1 Nil?: 0 Field: 16 LHTORD UB Type: 1 Size: 3 Nil?: 0 Field: 17 LHTOAI 26 Type: 1 Size: 11 Nil?: 0 Field: 18 LHTAPL UB Type: 1 Size: 3 Nil?: 0 Field: 19 LHTOCJ 99999 Type: 1 Size: 8 Nil?: 0 Field: 20 LHTOCD GOOGLE *Wild Lif Type: 1 Size: 30 Nil?: 0

When i do the same quey on data base or a client gui of system i navigator the correct data is: LHTINT : 447410149216001382871 LHTFEX: 2510 LHTOCD : GOOGLE *Wild Life g.co/

The query i used was: "SELECT * FROM AZ7SWTPRD.AZLHT WHERE LHTOFI=20210608 and lhtint='447410149216001382871' LIMIT 1"

What i could be doing wrong?

alexbrainman commented 3 years ago

What i could be doing wrong?

I do not know.

Sorry, I could not be more helpful.

Alex