Results 1 to 2 of 2

Thread: Receive decimal separator from select in IBM DB2 data Studio with VBNet Studio 2017

  1. #1
    Join Date
    Aug 2021
    Posts
    3

    Receive decimal separator from select in IBM DB2 data Studio with VBNet Studio 2017

    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
    Attached Images Attached Images

  2. #2
    Join Date
    Aug 2021
    Posts
    3
    Sorry double post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •