Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange change in table
Message
From
26/09/2012 09:15:56
 
 
To
26/09/2012 09:10:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01553633
Message ID:
01553663
Views:
49
>>>I have a table and had to add a field to it to hold a record number so the records position would appear in a list box in a report to be developed.
>>>
>>>I named the field 'rank' and added a bit of code to a prg to loop through the table replacing rank with recno() to fill the field for display.
>>>
>>>Everytime I run the code an error "variable 'rank' is not found." is presented. When I check the table, the field I added is gone.
>>>
>>>I restarted my computer and added the rank field to the table again and when the code is run, the same trouble occurs and the field is gone from the table.
>>>
>>>How can I correct this?
>>
>>A couple of ideas........
>>
>>1. Check DBF('yourTable') in that prg to make sure you're actually pointing to the correct table
>>2. Make sure that you aren't somehow deleting and recreating the table during processing (SELECT INTO TABLE yourTable)
>
>
>OH for POOP sakes!! I found the trouble. All it took was a good night's sleep and realizing I was re-creating the table (without that field) through a sort routine further back in the code. That's an easy fix. Apologies folks. :- |

Bang your head into your desk, take two aspirins, and call back tomorrow! :-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform