Search code examples
foxprovisual-foxpro

Visual FoxPro 9.0 writing to FoxPro 2.6 tables


I'm trying to get an older Bill of Materials system to export parts to a Accounting system so that I can eliminate some redundancies in paperwork for an office. Both are written in FoxPro 2.6 for Windows. I have a copy of Visual FoxPro 9.0. I know I can read from the table in Visual FoxPro 9.0 without a problem. Can I write to the older 2.6a table without harming them in VFP 9.0? I originally tried to implement this in java but in my research, it seems like writing it natively in VFP would be easier. Any insight into this would be much appreciated. Also I know this is an ancient system I am trying to update but, it is a quick fix for now. Later there will be much more sweeping upgrades to the systems.


Solution

  • Yes, FoxPro is backwardly compatible so you can write to the older tables. If you need to make a copy you need to specify the type:

    COPY TO c:\mytable.dbf TYPE FOX2X