delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/07/20:10:17

Date: Mon, 8 Sep 1997 08:08:18 +0800 (GMT)
From: Orlando Andico <orly AT dilnet DOT upd DOT edu DOT ph>
To: Hermann Strijewski <herman AT sprynet DOT com>
cc: djgpp AT delorie DOT com
Subject: Accessing FoxPRO or dBASE files from DJGPP
In-Reply-To: <5ut114$f35$1@juliana.sprynet.com>
Message-ID: <Pine.SGI.3.93.970908075603.1721B-100000@gibson>
MIME-Version: 1.0

On 7 Sep 1997, Hermann Strijewski wrote:

> Is there a library or functions that I can use with DJGPP to access FoxPRO 
> (preferred) or dBASE data files and, if possible their index files?
> 
> Ideally I'd like to read and WRITE data into these files.
> 
> Thanks in advance for any hints.

There is a "freely" available system called X2c which is a dBASE to C
compiler (well, it's based on gcc-2.2.x and spits out bare executables
given dBASE PRG input files). I'm currently playing with this - it's VERY
good. Source-compatible with Clipper Summer '87, FoxBASE+ 2.x and dBASE
III+. Only available as binary code (executables and libraries) for Turbo
C, Borland C, Microsoft C, and GCC under Linux.

You can find it at http://www.on-the-net.net/x2c/

It has a C-language interface, so you can call the database functions from
a C program. The source code is "freely" available -- that is, if you have
US$100 to spare for processing. I don't exactly understand OnTheNet's
distribution policy -- they're willing to part with the source (you can't
resell the library source or binaries, but anything you make is totally
unrestricted) but they won't put it up on an FTP site, you have to pay the
so-called "distribution fee."

The bad news is, there's no DJGPP distribution right now. I think it would
be trivial to port X2c to DJGPP (you can use the Unix source out of the
box, as long as you install PDCurses for screen control). I really think
it would be a great service to the DJGPP community to have an X2c binary
distribution, but personally I can't spare the US$100.. so I live with the
Linux version (not bad, I hardly use DOS, but other people do).

If you can't use X2c for one reason or the other, Brad Eacker has written
a tiny set of utilities to read/write/dump dBASE files. Tiny as in tiny.
You can find it on any Sunsite mirror or I can mail you the distribution
(66K tar'red and gzip'ed). It can only do the basic stuff (add record,
delete record, dump all records to stdout). You need lex and yacc if you
want to build the grammar recognizer, but otherwise shouldn't be a
problem.

-------------------------------------------------------------------
Orlando Alcantara Andico
WWW:   http://www2.mozcom.com/~orly/         Email: orly AT mozcom DOT com
ICBM:  14 30 00 N  120 59 00 E               POTS:  (+632) 932-2385

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019