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
When I run from Data Studio the queryCode:REFER(DECIMAL(6,0)) NOM(CHAR(20 OCTETS ) MONTANT(DECIMAL(18,2)) 1 NomA 15874.00I receive 15874.00Code:SELECT MONTANT from 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