Create Database from DBF (Dbf2Db) |
Description:
Dbf2Db allows you to create a new database (MDB or DBF) from
a DBF formatted input file. Dbf2Db will first analyze the input and
create a analyze file with the column names and data type (see DbAna
for details)
By default Dbf2Db writes the output to New.mdb
unless you specify a database with the -d option (like -d new.dbf).
The table name is extracted from the input file unless you specify
a table name (applies only for new MDB databases not to DBF).
The DBF data is loaded into the new database unless yoiu specify the -c option.
Dbf2Db writes all diagnostics to a log file "logs/yyyymmdd/Dbf2Db.log"
Note that In demo mode up to 100 records can be analyzed.
Syntax:
usage: Dbf2Db [-csn] [-d{db}] -i[!]{in}
[-t{tab}] [-f{font}]
-d = DATABASE: Specify new database filename (MDB or DBF) (default New.mdb)
-i = INPUT : Specify XML input file (! specified an analyze file directly)
-t = TABLE : Specify Table name (only used for new MDB databases)
-c =CREATEONLY: Dont load, just create empty database with structure)
-s = SILENT : Dont show diagnostics (XX Records written..)
-n = NOHEADER: Input has no header line for column names
(Logfile written to logs/YYYYMMDD/Dbf2Db.log
Example: Dbf2Db -i Employees.DBF
Example:
Dbf2Db
-d Emp.DBF -i Employees.DBF
Line 9: scanned Employees.DBF
Dbf2Db: Create new Database 'Emp.DBF' from Employees_ana.txt
Created
a new DBF database (Emp.DBF) with the structure matching Employees.DBF.
To load data into the new database use DbLoad
If
the output database aleady exists the following prompt appears (unless you
specify -s):
Logfile:
If you run this command on Feb 18th, 2001 the logfile
would be created in:
logs/20010218/Dbf2Db.log
INIT |16:07:06.746 |====== Opening
C:/DbXml/logs/20020218/xml2db.log ======
DbTkXml |16:07:06.856 |ExecCmd: analyze Employees.DBF
Analyze |16:07:06.926 |Input=Employees.DBF,
Analyze |16:07:06.986 |9 Record(s) processed from 'Employees.DBF'++Result in 'Employees_ana.txt'
DbTkXml |16:07:07.026 |ExecCmd: CreateDb Employees_ana.txt|Emp.DBF