Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read and parse uploaded foxpro dbf file

Status
Not open for further replies.

den06boy

Programmer
Sep 22, 2003
5
MY
hey folks, I need help here to "parse" the uploaded foxpro dbf files. ANyone has any idea how should i start? The scenario would be something like 1) upload the foxpro dbf files 2) read and parse the files 3) get the data and insert it into the current database (oracle). The problem is at stage 2 which I have no idea how to read the data files which are in non-perceivable format.
Thanks in advance for any advice.
 
BTW i am using cold fusion programming tools, if that matters
 
What exactly do you mean by "parse" in this context? Do you mean you want to extract values from the various fields in the DBF?

If so, you could write a little routine that examines the file header to see where each field begins and ends within each record. The format of the file header can be found in the VFP Help file, under "Table file structure".

However, it is likely that there is a tool already available to do that in your language. The DBF file structure is such a common format that someone is sure to have written it before.

Another option -- if your language supports ODBC or OLE DB, you should be able to access the data directly.

Mike


Mike Lewis
Edinburgh, Scotland
 
I'm working on samething similar BUT on SQLserver2000, and I dont know what kind of input gates you have to oracle.

On SQLW2k I can work easyly with Data Transfer Services.

If you don't have an automatic data transfer service(by oracle's control), look at the data input gates (what kind of files Oracle can import) and choose an affordable one for you. Append the data to a tmp table, and process this table to your needs.

The way I know from others(oracle) is to use "text formatted files"(create these files with a foxpro report), and to import data from these files.


Can you send to me a feedback with:

- how you upload the foxpro dbf files

- what you mean by parse the files
non-perceivable format

Friendly,
iacob_nicusor@giurgiu.romtrans.ro

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top