Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Foxpro limitations

Posted on 2006-11-12
10
Medium Priority
?
1,699 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 80 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 80 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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 80 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

783 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