Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call a table with an aleatory name?
Message
De
19/07/2004 09:20:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/07/2004 08:51:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00925712
Message ID:
00925724
Vues:
17
"Aleatorio" in English is "random".

You need to store the random name to a variable, for future use. I think that would be your variable "unotab".

You might re-open the table with a fixed alias:
create table (unotab) ...
use
use (unotab) alias MyTempTable
Then, you can reference the table with the alias MyTempTable, in this example.

Another option, which is often much better, especially for some temporary processing, is NOT to use a table - use a cursor instead. A cursor is similar to a table, but VFP assigns it a random name on disk (so you won't have multiuser conflicts). Also, as soon as you close it, it is deleted automatically; you don't need to erase it.

>Hello, i don't know how to solve this:
>I'm creating in a variable...
>
>store "b"+substr(sys(2015),3) to unotab
>and i drop a query result into this variable...
>
>into table (unotab)
>And all works fine until i have to call the table because i don't how to make reference to an element of this query, how can i do this?
>
>Thanks for the support
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform