Writing FLOATs to dBase III tables

  • Thread starter Dmitry Samokhin
  • Start date
D

Dmitry Samokhin

I'm developing an application which reads data from a server-side database
and exports it to DBF (dBase III format) tables. To perform this, the ADO
and the Jet Database Engine is utilized. But when writing fields of 'float'
datatype the engine rounds them incorrectly (always truncates): my DBF has,
for exampe, a field of type NUMERIC(15,5), and the double-precision value
4.78457852348625 is written to this field as 4.78457, not 4.78458 as
expected.

Unfortunalely, there are some machines where it rounds correctly, but some
machines where is does not. I can't find the cause.

Here is my environment:
Win XP SP2 (and Win Srv 2003)
File versions:
msjet40.dll - 4.0.8618.0
msjetoledb40.dll - 4.0.8227.0
msxbde40.dll - 4.0.8025.0
ADO connection string: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<my
dir>;"Extended Properties=dBASE III;"

Thanks for any help.
Dmitry.
 
Top