From: Jakob E. <jab...@gm...> - 2011-04-09 06:07:18
|
Dear Chris, The problem you are describing looks like the old Numeric problem, where the first two digits after the decimal point are lost. This problem was fixed in January here: https://github.com/brianb/mdbtools/commit/82b28d684547f4619ea022ac1a20d872f1396cee Then there is a second problem, when you have more than a total of 9 digits, or when you have negative numbers. This issue was fixed in March here: https://github.com/brianb/mdbtools/commit/1f3c04990d5d70622c015f2880769bc44257efa4 Are you really sure that you are using the patched version of MDB Tools? Maybe you have some library issues: it could be that you still have an old version of libmdb somewhere, and that mdb-export dynamically links against that old version. Maybe you need to type "make install" to install the new library after compiling? (Note: I use my custom build script for libmdb, so I'm not sure how you're supposed to compile mdb tools) for debugging, try "which mdb-export" to make sure you are calling the newly compiled version of mdb-export. then try "ldd /usr/bin/mdb-export" to find out against which libmdb it is linked. Then check the linked "libmdb" file's creation date. Greetings, Jakob On 08.04.2011, at 22:32, Chris Craig wrote: > Jakob Egger <jabakobob <at> gmail.com> writes: >> Dear friends, >> >> I finally found out how NUMERIC fields are really stored, so let me share this >> with you. > > This is great work Jakob, I was wondering why the numeric fields weren't being > loaded correctly with mdb-tools, I guess they were not fully supported. > > Unfortunately your patch doesn't seem to fix the issue with the MDB files I'm > receiving - In fact I loaded your sample file into Access 2007, made some minor > modifications to the schema (changed scale from 5 to 6, for example), and after > saving, the data was no longer read correctly. > > Here are a few sample files that load correctly in Access 2007 - > "Database200x.mdb" have bits taken from the actual files I've been processing, > "decimals2000.mdb" is the reformatted version of your sample file. Interestingly > Access decided it needed to be 80% larger or so... > > decimals2000.mdb: > https://docs.google.com/leaf? > id=0B41UJ3cF5h0CMGM5YmQ3YWItMDk0Ni00MTE4LTk1NGItNjFlNzZlMjUyNzc5&hl=en > > Database2003.mdb > https://docs.google.com/leaf? > id=0B41UJ3cF5h0COTM2MTU1MzItYTI5Mi00YjUzLWFlMzMtZTIyMDkxNjBkN2Q3&hl=en > > Database2000.mdb > https://docs.google.com/leaf? > id=0B41UJ3cF5h0CMjI2MDM5ZTAtODk1ZS00ODkwLWE1OWEtNDkwYzM3NmFiYTY5&hl=en > > For the last two files the data should be: > ON,0.0055,0.000715,0.433333 > ON,0.0025,0.000325,0.133333 > > Using mdb-export (compiled on debian 64-bit or freebsd 7 on i386) it comes out > as: > ON,0000000000.5500,0000000000.0715,0000000000.3333 > ON,0000000000.2500,0000000000.0325,0000000000.3333 > > Actually now I just took a closer look at your sample file, and it doesn't seem > to be handled properly either... I've double checked the source and it's > definitely the patched version of data.c (mdb_num_to_string has been replaced by > mdb_numeric_to_string, etc). > > I'll take a look at the files and code myself and see what I can glean... > > Thanks! > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev |