Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set order to tag ?
Message
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00018149
Message ID:
00018296
Views:
46
>> In foxpro 2.5, it opens the dbf and cdx file fine and works very well.
>>today, we want to use visual foxpro 3.0 to update the application system.
>>we open the dbf file fine but when I use 'set order to tag key1_tag' it
>>cause an error 'Variable 'key1_tag' is not found''. I don't
>>know what happened.
>
>Let's see -- what happens if you try to modify the table's structure in VFP3? It should show you the index tags. If it doesn't, try opening the table in 2.5 and COPY TO newFile CDX. Then, try opening newFile in 3.0. If that works, just trash the old file and rename newFile.dbf and newFile.cdx (and .fpt?)
>
>> I create a dbf file in vfp 3.0 and try to open it in foxpro 2.5,but it
>>can't be open! this must have some relations to my current problem.
>
>Right -- as was pointed out, the 3.0 file structure is different from the 2.5. However, 2.5 files should work just fine in 3.0. To make a 3.0 dbf work in 2.5, you need to COPY TO newFile TYPE FOX2X -- that strips the database container information from the copy of the table.
>
>> In C language file, it is only a system function to create the dbf and cdx
>>file. I think it is difficult to modify the C language file. What can I do?
>
>Don't worry about it, basically. :-)

Garrett's information about the difference between FP2.5 and FP3.0 files is correct, and you should follow his directions if you need to read files with both programs. However, concerning your original problem of the index tag/file not loading, you may not be in the correct table when you try to set the index tag. For example

Close Data All
use mytable
set order to tag ID

will work. However,

use firsttable
use mytable
set order to tag ID

will NOT open the index in MyTable because you are still in the FirstTable area. Add a SELECT MYTABLE to the code or load the index when you USE the table

use firsttable
use mytable
SELECT MYTABLE
set order to tag ID

or

use firsttable
use mytable order tag ID

It is my understanding that this is different from FP2.x.

Barbara Paltiel
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform