Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add a virtual field to a table!!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01070980
Message ID:
01070988
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform