Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Foxpro limitations

Posted on 2006-11-12
10
Medium Priority
?
1,692 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

730 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