Re: Looking for a converter

"Kenneth D. Reiszner" <[email protected]>
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
John Fabiani wrote:

> Hi,
> I'm looking for a way to convert the table stru from a DBF  to Postgres
> (to use with my gnue program).  Does anyone know of an easy way to get
> this done.  Getting data into the table appears to be easy - but I have
> to setup the table first. I tired to get pg2dbf working but was unable
> to compile it for SUSE 9.0.  So I need a little help to ease the pain
> moving from DBF to postgres.
>

I am sure somebody else has a better solution  than this, but I would find
a machine with Microsoft Access 97/2000 (Might work on later versions) and
import the file(s). Then I would use one of the tools that will covert the
file to a sql file compatible with PostgreSQL. The one that I have used is
exportSQL version 3.2-dev
http://www.rot13.org/~dpavlin/projects/sql/exportSQL3.txt . This is a text
file that can be pasted into a blank MS Access module. The output includes
a file for creating the database, one for inputting the data and a third
for deleting the tables created if things go poorly.

If your release of PostgreSQL (7.3 does) complains about creating the
tables with the date fields created by this tool do a search and replace in
a text editor to change them to something more viable. Alternatively, and
more elegantly alter the text file above. I have converted about half of my
files for my company to Postgresql with this tool and I consider myself a
real novice. Eventually I will move everything over. MS Access imports data
well but exports data only grudgingly. With this tool its character is
changed.

Good luck,

Kenneth D. Reiszner, Ph.D.
President
REAL, Inc. (Reiszner Environmental & Analytical Laboratories )
P.O. Box 709,
Lecompte, LA 71346

Ph.No. & FAX: 318-443-0426

> John
>
> _______________________________________________
> Gnue mailing list
> [email protected]
> http://mail.gnu.org/mailman/listinfo/gnue

_______________________________________________
Gnue mailing list
[email protected]
http://mail.gnu.org/mailman/listinfo/gnue
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.