Attached (I hope)
is a C prog I slapped together to take the contents of a DBF file and blow it
out to a SQL Loader dat file. I got most of the info from
asktom.oracle.com. He has a package posted there to read a DBF file
and insert rows into an oracle table. It is a robust, general-purpose
package, but because it inserts rows one at a time, it's as slow as
Christmas. I use a ksh script to generate a control file (using the print
header only option of the C program), start up sql loader and have it suck on a
named pipe, generate sql loader dat info using all of the C program,
and have it write to the named pipe.
You can compile
the C program and see if you get what we would expect to get from the DBF
files. The C program works entirely through command line
redirection.
Example: c_prog
[options] < dbf_file > output_file
|
dbf_reader.c
Description: Binary data