|
From: Hamburgpear on 14 Feb 2006 20:54 Dear expert user, How can I write my data to a DBF file format? Thanks HBP
From: e p chandler on 14 Feb 2006 21:44 Hamburgpear wrote: > Dear expert user, > > How can I write my data to a DBF file format? > > Thanks > > HBP I take it that you mean dBase (2,3,3+,4,5,etc.). Find a database or spreadsheet that accepts your data format as input which also can export data as a .DBF file. (Or use Office Automation / ODBC.) Since the target is a data base file, you have to define field types and widths for the target to be used in the conversion. Writing a conversion program in Fortran is possible but painful. A .DBF file consists of a header record, followed by field descriptor records followed by the data, followed (usually) by an EOF mark. Ignoring memo fields, data is stored in character form as fixed width fields in fixed length records which follow a deleted/not_deleted flag for each record. There are no record or field delimiter characters. The header record and the field descriptor records are fixed size, but not necessarily the same size as the data records. Also they can contain (almost arbitrary) numeric data. So if you want to do this in Fortran, I would suggest using a compiler that supports "stream" aka "transparent" aka "binary" [no flames please] access. -- Elliot e-mail: epc8 at juno dot com
From: Jugoslav Dujic on 15 Feb 2006 04:08 e p chandler wrote: | Hamburgpear wrote: || Dear expert user, || || How can I write my data to a DBF file format? || || Thanks || || HBP | | I take it that you mean dBase (2,3,3+,4,5,etc.). | | Find a database or spreadsheet that accepts your data format as input | which also can export data as a .DBF file. (Or use Office Automation / | ODBC.) | | Since the target is a data base file, you have to define field types | and widths for the target to be used in the conversion. | | Writing a conversion program in Fortran is possible but painful. www.wotsit.org is a good resource for file formats. I recall searching for .dbf once there (luckily, not for my own needs, I was answering someone's question) and the ugly thing is that there's at least of dozen different ..dbf formats. www.canaimasoft.com produces (produced?) f90sql package, which enables database interfacing for several compilers. That might be an easier way to go than binary dump of .dbf files. OP did not indicate his compiler though. For IVF, Steve Lionel recently posted unsupported F90SQL modules here: http://softwareforums.intel.com/ids/board/message?board.id=5&message.id=16454 -- Jugoslav ___________ www.xeffort.com Please reply to the newsgroup. You can find my real e-mail on my home page above.
From: Vladimir Vasilchenko on 15 Feb 2006 08:21 "Hamburgpear" <hamburger(a)germany.de> ???????/???????? ? ???????? ?????????: news:43f289d6$1(a)newsgate.hku.hk... > > Dear expert user, > > How can I write my data to a DBF file format? > > Thanks > > HBP > You can use ODBC drivers for DBF-files using for writing/reading. For the case of Visual FoxPro, you must understand, that there is some differencies between "free tables" (separate dbf-files) and databases (dbf-files as the part of some "DBC-project")... -- Vladimir V.Vasilchenko "Fortran Programmers Club" http://www.donpac.ru/usr/golub/fortran/
From: Hamburgpear on 15 Feb 2006 20:14
Thanks a lot for all your helps!! "Hamburgpear" <hamburger(a)germany.de> wrote in message news:43f289d6$1(a)newsgate.hku.hk... > Dear expert user, > > How can I write my data to a DBF file format? > > Thanks > > HBP > |