Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Classlib
Message
De
15/12/1997 18:36:13
 
 
À
15/12/1997 12:10:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00065671
Message ID:
00066063
Vues:
43
The following is from the Help for USE:

"When a table is opened, it is automatically assigned an alias, which is the table name if ALIAS isn’t included. You can create a different alias for the table by including ALIAS and a new alias. In Visual FoxPro, an alias can contain up to 254 letters, digits or underscores and must begin with a letter or an underscore. In other FoxPro versions, an alias can contain up to 10 letters, digits or underscores and must begin with a letter or an underscore.

[cut]

A default alias is also assigned if a conflict occurs."

The first paragraph states what an alias can be.
The last one states what happens in the case of conflict. IMHO, if the table name cannot be used as alias because it would not be a correct alias, it's a conflict. So, the last rule is applied. This is the FoxPro's behavior when the table name doesn't start with a letter or underscore. And this is documented clearly enough. So, IMHO, this is not a bug and it is consistent with the documentation.

In the case when the table name is made only of digits, another conflict occurs: the table name used as alias would conflict with the area with the same number (when the number is valid as area number).

Vlad

>Vlad,
>
>So how would you define this, if not as a "bug". . .
>
>As you know, FP/VFP will use the table name as the alias when no alias is specified.
>
>With a table named "3CHR" one does *not* get the alias of 3CHR, ostensibly because, as you said, an alias *must* start with a alpha character or a underscore.
>So we have an "incomaptability" between USE and ALIAS in some cases. Is this a "bug"????
>
>Cheers,
>Jim N
>
>>>>Have you tried renaming the libraries like this:
>>>>
>>>>VCX_1500.vcx and VCX_2360.vcx
>>>>
>>>>and then accessing them?
>>>>
>>>>This reminds me of using sys(3) to generate a unique name which
>>>>turns out to be a numberic name. When foxpro uses it, it gives
>>>>it an alias like A OR C, etc.
>>>
>>>Carl,
>>>
>>>What we did was issue a
>>>SET CLASSLIB TO 2360 ALIAS C2360
>>>
>>>That works.
>>>
>>>However, anothere interesting tidbit is the fact that you cannot issue
>>>SET CLASSLIB TO 2360C
>>>
>>>You get a syntax error.
>>>
>>>Wayne
>>
>>As far as I know, this is an old problem in FoxPro. But this is not a bug, since an ALIAS must start with a letter or underscore.
>>
>>Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform