Solved

Foxpro limitations

Posted on 2006-11-12
10
1,656 Views
Last Modified: 2007-11-27
Hi,

A client has asked me to take a look at a foxpro backend and access frontend system. The issue the client is having is that no one has any foxpro experience as the developer has long since gone.  I've yet to see the application but it would be good to know if there are any solid reasons to move away from this architecture i.e. are there any know limitations with foxpro.  (I will be finding out the version number tomorrow but I suspect is an old version of foxpro).

I may be advising the clinet to move to an access backend and frontend design so the more reasons I can give the better.

Thanks
0
Comment
Question by:geraintcollins
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 18

Accepted Solution

by:
Data-Man earned 20 total points
ID: 17927701
If the FoxPro tables are linked to the Access frontend, it will have to be via ODBC...ODBC is slower than having the data stored in Access tables.

Mike
0
 
LVL 54

Assisted Solution

by:nico5038
nico5038 earned 20 total points
ID: 17928117
Not switching to "only Access" will require the client to maintain not only a copy of Access, but also of Foxpro when tables need to be changed....
He'll never notice the difference, but he'll stay dependent on (some) Foxpro knowledge.

Nic;o)
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 17930270
Nico...good to have you back..mike
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 54

Expert Comment

by:nico5038
ID: 17930586
Thanks Mike, I'm here to stay :-)

Nic;o)
0
 

Author Comment

by:geraintcollins
ID: 17945929
ok so I've met with the client and its foxpro 2.6 - (released in 1989!).  He's happy to migrate to Access. Any ideas how to import the data from fox pro 2.6?  Not surprisingly the dbf import options in access won't do it.
 
0
 
LVL 54

Expert Comment

by:nico5038
ID: 17945955
Did you try to install the Focpro 2.6 on your PC ?
Then the standard import using filetype .dbf might work like it did for me.

Nic;o)
0
 

Author Comment

by:geraintcollins
ID: 17950377
Yes but I keep getting the error message "external table not in the expected file format" when I try importing the dbf.
0
 
LVL 1

Assisted Solution

by:CharlesWard
CharlesWard earned 20 total points
ID: 17960030
Hope this will help you - there are not many of us long-time xBase programmers left around however I still create massivly large systems to handle factories and state-wide systems using Foxpro because it is un-surpassed in my experience.

Answer:  Solution 1

You can try exporting the data to Excel.  For example in Foxpro 6.0+ you can use the following syntax:

Use ???      && The ??? is replaced with the name of the database/table you want to open
Export to C:\DataOut Type XLS      && This will export the data to an Excel spreadsheet called C:\DataOut.XLS

you can then import the data in Access from the excel database.  


There are other types of export options as well:

DIF  
Each field from a Visual FoxPro table becomes a vector (column) and each record becomes a tuple (row) in a DIF (Data Interchange Format) file, used by VisiCalc. The new file name is assigned a .DIF extension if an extension isn't included in FileName.

MOD
Use the MOD clause to export to a file in Microsoft Multiplan version 4.01 MOD format. The new file name is assigned a .MOD extension if you don't include an extension in FileName.

SYLK
A Symbolic Link interchange format (used by Microsoft Multiplan) in which each field from a Visual FoxPro table becomes a column in the spreadsheet and each record becomes a row. By default, SYLK file names have no extension.

WK1
Include this option to create a Lotus 1-2-3 spreadsheet from a Visual FoxPro table. A .WK1 extension is assigned to the spreadsheet file name for use with Lotus 1-2-3 revision 2.x. Each field from the table becomes a column in the new spreadsheet, and each record in the table becomes a spreadsheet row.

WKS
Include this option to create a Lotus 1-2-3 spreadsheet from a Visual FoxPro table. A .WKS extension is assigned to the spreadsheet file name for use with Lotus 1-2-3 revision 1-A. Each field from the table becomes a column in the new spreadsheet, and each record becomes a row in the spreadsheet.

WR1
Include this option to create a Lotus Symphony spreadsheet from a Visual FoxPro table. A .WR1 extension is assigned to the spreadsheet for use with Symphony version 1.01. Each field from the table becomes a column in the new spreadsheet, and each record in the table becomes a row in the spreadsheet.

WRK
Include this option to create a Lotus Symphony spreadsheet from a Visual FoxPro table. A .WRK extension is assigned to the spreadsheet file name for use with Symphony version 1.10. Each field from the table becomes a column in the new spreadsheet, and each record in the table becomes a row in the spreadsheet.

XLS
Include this option to create a Microsoft Excel worksheet from a Visual FoxPro table. Each field in the selected table becomes a column in the worksheet, and each table record becomes a row. An .xls file name extension is assigned to the newly created worksheet file unless you specify a different extension. You can export a maximum of 65,535 rows, which includes one row reserved for the field header.

XL5
Include this option to create a Microsoft Excel version 5.0 worksheet file from a Visual FoxPro table. Each field from the currently selected table becomes a column in the spreadsheet and each record becomes a row. An .xls extension is assigned to the new worksheet if you do not include a file extension. You can export a maximum of 65,535 rows, which includes one row reserved for the field header.


Answer: Solution 2

The other option is to create a small foxpro program to generate either a flat ASCII text file or a CSV file by using the FOPEN, FPUTS and the FCLOSE commands.  

For example - suppose that you have a table with three fields called "Field1, Field2 and Field3"

FileHandle = fCreate ( 'C:\DataOut.TXT' )     && Create A Text File called C:\DataOut.tXT
Select A
Goto Top
Do While EOF() = .F.    && Old School Syntax - we use SCAN/ENDSCAN now a days
     fResult = fPuts ( fileHandle, A->Field1 + '  ' + A->Field2 + ' ' + A->Field3 )    && Output a string
     Skip
EndDo
fResult = fClose ( FileHandle )   && Close The Test File

Of course this will not account for other data types - this example is for Strings only - but if you had numbers you could replace with Str( A->Field2, 10 ) or Str(A->Field2, 10, 4) to indicate a number 10 digits long or a number 10 digits with 4 decimal places.

Hope This Helps.
0
 

Author Comment

by:geraintcollins
ID: 17961756
Thanks for the information.  I found that the problem was due to a foxpro numeric column containing non-numeric data.  I changed the data type to character and it imported.  I'll distribute the points accordingly.
0
 

Author Comment

by:geraintcollins
ID: 17961772
had to increase the points to split them three ways
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question