Hello to everyone involved in Database stuff, and here for IBM Data Studio and DB2
My first post
Problem to select field with decimal.
See partial content of table PIERR. COMPDBA
Code:
REFER(DECIMAL(6,0)) NOM(CHAR(20 OCTETS ) MONTANT(DECIMAL(18,2))
1 NomA 15874.00
When I run from Data Studio the query
Code:
SELECT MONTANT from COMPDBA
I receive 15874.00
OK fine with the decimal part.
Now in Microsoft visual Studio 2017, in VBNet, I perform the same operation
Code:
DBConnA = New Odbc.OdbcConnection(DBConnectionStringA)
DBConnA.Open()
DBCommandA.CommandTimeout = 3600
DBCommandA = New OdbcCommand(DBSQLA, DBConnA)
DBDataReaderA = DBCommandA.ExecuteReader()
Code:
Where DBSQLA = "SELECT REFER,NOM,MATRI,MONTANT,FLAGN,FLAGA,USERID FROM COMPDBA;"
but I receive 1587400 with no decimal separation.
Any idea please. Thanks
Pierre