.Dbf file column value chnaging RRS feed

  • Question

  • Hi everyone,

             I'm reading a dbf file to data table.. while i'm reading ,one of the column value(say price) is rounded of in DataTable after reading. Ex: Price is 99.099 in Dbf file.. after reading it to datatable it is 100..



    OdbcConnection oConn = new System.Data.Odbc.OdbcConnection();

    oConn.ConnectionString =

    @"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=C:\BDF\;Exclusive=NO; Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;";



    OdbcCommand oCmd = oConn.CreateCommand();

    oCmd.CommandText =

    @"SELECT * FROM  path";


    OdbcDataAdapter da = new OdbcDataAdapter(oCmd);


     In this dt the value of all the decimals are rounded..But in Dbf it is decimal value

    Pls let me know how can i get precise value from dbf..

    Thank u






    • Moved by SamAgain Tuesday, July 6, 2010 9:55 AM better fit (From:64-Bit .NET Framework Development.)
    Tuesday, July 6, 2010 9:01 AM

All replies