Problem: FoxPro 2.6 DOS version – update Qty column in a table from another table

Problem: FoxPro 2.6 DOS version – update Qty column in a table from another table

Good Morning,

I need up overwrite the “Quantity on Hand” column in an Inventory table from an excel spreadsheet.

Process:

1.  Export Inventory table to text delimited file  (copy to c:inv0612.txt fields itemnumber, qtyonhand delimited)
2.  Import into Excel as text
3.  Modify quantities
4.  Export from Excel
5.  Import back into FoxPro
6.  Take this new information and completely overwrite JUST the Qty fields based on the itemnumber (unique ID)

Problem:

1.  I know, and have done, the export and correction process
2.  How do I bring it back into FoxPro and update the original table
3.  I only have a program called “Quickie” which is a very limited subset of FoxPro 2.6
4.  I do have Visual FoxPro but I do not know how that will affect the older version

I believe this to be a relatively simple solution, but my experience is NOT with FoxPro, rather SQL Server.

Thank you.

– Adam


 

Solution: FoxPro 2.6 DOS version – update Qty column in a table from another table

‘I do have Visual FoxPro but I do not know how that will affect the older version’

the above is the answer to the problem!

I assume that the current table is a fox 2.6 (dos), the ONLY thing that you need to watch out for
is do NOT attempt to open the DOS table EXCLUSIVE, VFP will request the code page. If you select a code page
the file will become unreadable in FOX 2.6 apps

I would suggest that you drop the EXCEL step (If you can!) and use VFP directly
as follows

VFP program

select itemnumber,qtyonhand from mydostable into table tmp
use tmp
index on itemnumber tag itemnumber

browse

AT THIS POINT you can change the Qtyonhand

USE

Another VFP program

use tmp order itemnumber
select 0
use mydostable
set relation to itemnumber into tmp

replace all qtyonhand with tmp.qtyonhand
use