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 COMPDBA
When I run in Data Studio thisCode:REFER(DECIMAL(6,0)) NOM(CHAR(20 OCTETS)) MONTANT(DECIMAL(18,2)) 1 NomA 15874.00
I receive MONTANT 15874.00 Which is fineCode:SELECT MONTANT FROM PIERR.COMPDBA
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()but I receive 1587400 with no decimal separation.Code:Where DBSQLA = "SELECT REFER,NOM,MATRI,MONTANT,FLAGN,FLAGA,USERID FROM COMPDBA;"
Any idea please. Thanks
Pierre



Reply With Quote