Hello to everyone involved in Database stuff, and here for IBM Data Studio and DB2
My first post ![Smilie](images/smilies/smile.gif)
Problem to select field with decimal.
See partial content of table COMPDBA
Code:
REFER(DECIMAL(6,0)) NOM(CHAR(20 OCTETS)) MONTANT(DECIMAL(18,2))
1 NomA 15874.00
When I run in Data Studio this
Code:
SELECT MONTANT FROM PIERR.COMPDBA
I receive MONTANT 15874.00 Which is fine
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