Some utilities for working with DBF files

These tools read dBase files using Frank Warmerdam's shapelib.

Downloads

dbftools-1.9.tgz 83K gzipped tar file

Functions

dbfsql input_file [-c] [-t table_name] [-o output_file] [-id field_name] [-skip name1,name2,...] [-ctrl c]
Opens DBF file, generates SQL create and insert statements to import the data into MySQL as a table. Options:
  -c                show only CREATE statement
  -t table_name     specify the SQL table name
  -id field_name    create a unique id field
  -o output_file    write output to the specified file
  -skip name1,name2,... omit the specified fields from the SQL table
  -ctrl c           use c instead where any control character appears in the data
  -case upper|lower change field names to upper|lower case letters
  -pg               create SQL compatible with PostgreSQL
dbfphp input_file
Opens DBF file, generates PHP code to create the table using the PHP built-in function dbase_create()

Technical contact:

    Peter N. Schweitzer
    Mail Stop 954, National Center
    U.S. Geological Survey
    Reston, VA 20192

    Tel: (703) 648-6533
    FAX: (703) 648-6252
    Email: pschweitzer@usgs.gov