Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alias not found
Message
De
06/03/2005 21:02:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/03/2005 20:50:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Divers
Thread ID:
00993179
Message ID:
00993181
Vues:
13
>Hi all
>
>When i run the code below, i get error 13, 'Alias bot found',
>
>	.lTname_tmp=LOWER(.lChave)
>	.RS2CURSOR(.oRS1,.lTname_tmp)
>	SELECT (.lTname_tmp)
>
>But if i change, to
>
>        .lTname_tmp=LOWER(sys(2015))
>
>it works ok.
>
>Joao Batista

You didn't explain what your method .RS2CURSOR() does. Let's say it creates a table with a certain name. It is possible that the property .lChave contains invalid characters, for example, hyphens. For your function to work, if I understand its purpose correctly, .lChave must contain a valid alias. If it doesn't, VFP will assign a different alias. For example, if your table is called "abc-def", the alias will be "abc_def". Note that the hyphen was converted to an underscore. Also, if the alias is already in use, perhaps a different alias is created.

What you must really do, is to debug. Right before the last statement, the SELECT in your sample, put the command SET STEP ON, and then check (with the SET command) what aliases are in use.

If you don't know what an alias is: Every table is opened with an alias, which is a temporary name for the table. The alias is very often, but not always, the same as the table name.

You could also change your method .rs2cursor(), so that it assigns a specific alias to whatever table you open or create.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform