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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

foxpro 2.6 for dos and export or conversion

Status
Not open for further replies.

Gaidi

MIS
Feb 27, 2003
8
0
0
US
I am trying to upgrade my Foxpro2.6 Memo files (.fpt) to a database program called embark. The FPT files are unreadable.I need to get them into a ascii file or some way of deciphering, converting or even seeing the file as well as link to the data. HELP.....







rgbean (Programmer) Feb 27, 2003
First, you really should have started a new thread and not simply added on to this virtually unrelated topic.

That said, you normally don't access a memo (.FPT) file as a standalone entity. You should have a database (.DBF table) file with the same name. The .DBF has all the links to the locations of the data in the .FPT file. There are a number of ways to view this data - any version of FoxPro or VFP, Access, Quickview, and a number of freware / shareware viewers. To export the data, what program and technique you use will depend on what format "embark" wants it in.

Rick
THIS IS EMBARK's RESPONSE


Essentially what EmbARK requires to be able to import the memo data is discreet categories or columns (credit line, inscription) and a link to the corresponding FPT record. If you can find a way to Export the data from the DBF table in total, You may easily select only the memo data since the other information has already been imported into EmbARK.

Generally the process is this:

Export data from an existing DB as Tab delimited text
Open in Excel to review the info and clean it up if necessary
Copy the Excel data and Paste into a unformatted TXT file such as Wordpad or Simpletext
Import this TXT file into EmbARK.

We have retained the Fox Pro DB Object Id Numbers in the Temp ID field in EmbARK, so you may use that number to link the Fox Pro records with the corresponding EmbARK records.


 
Since you never really stated that you have FoxPro available, why not just skip the first step, and Import the data into Excel? Just create a File DSN to the FoxPro table using the Visual FoxPro ODBC driver. At least the first 256 characters in each memo field will appear in the appropriate column - it'll depend on your version of Excel.

If you require more than this, then you are going to have to do some programming in FoxPro, Access, VB, etc. - there isn't a "simple" way to get the data out of Memo fields. Even in FoxPro, the standard EXPORT / COPY TO doesn't work with memo fields.

For some sample code, go to - "HOWTO: Export Memo Fields with Other Field Types to a Text File". Note: This was written for VFP, but with some minor changes this could be written in FPD or FPW 2.x.

Rick
 
I do not have "visual foxpro" can I still do this with Fox Pro 2.6 for dos?
 
Yes, the program "almost" works in FPD 2.6a, it just required two syntax changes. Just put an "=" in front of the FPUTS() and FCLOSE() statements near the end. i.e.
Code:
   = FPUTS(lcTextFile, lcFieldString) && Writes string to the text file.
   lcFieldString = ''
ENDscan

= FCLOSE(lcTextFile)
Also make sure you create an emtpy .TXT file to dump the data into before DO ing the .PRG.

Rick
 
is ther a place to find some programming help in San Diego Calif. I am not comfortable with doing this..... Thabnks you you in advance.
Gaidi
 
Gaidi,
You can start by going to - The FoxPro Developers Network of San Diego. I'm sure they can point you in the direction of someone to provide some help.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top