Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add a virtual field to a table!!
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01070980
Message ID:
01070988
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Hi Russ,
>
>There is no key field. It could be any table.
>
>Ali
>
>>Maybe you could create a cursor with the same key as your table, and link it to the table with SET RELATION.
>>
>>>Hi Everybody,
>>>
>>>I edit a table in a grid. Is there a way that I could add a field to this table virtually? I don’t want to physically change the user’s tables. The names of the fields are uncertain and we don’t know whether there is a unique field in the table. This field will be used for programming usages.
>>>
>>>Thank you,
>>>Ali

You can still set a relation. For example:

Create cursor TempTable (Record I, Other Fields)
index on Record tag record

select MasterTable
set relation to recno() into TempTable
Whenever you need a value in any "Other Fields", you append a record in TempTable with Record = RecNo('MasterTable') (if needed)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform