Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find the CA alias name
Message
De
19/04/2022 14:39:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01684184
Message ID:
01684191
Vues:
54
Hi Dmitry,

A CA is just a way of creating a view instance. Once created, you can treat the cursor like any other cursor. as you discovered.

With the right code in the BeforeOpenTables event in the DE, you can in fact substitute a CA for a view or table that is in the DE. Everything just works. There are little differences (e.g., if your code looks for "sourcetype" = 2, the CA will be 102), easily worked around.

Hank

>I found, since I posted the initial message, that the OLDVAL() works without the alias. That is, I can use:
>
>OLDVAL( field_name)
>
>
>And in my initial test the above works. I just need to do more tests to be sure that the above OLDVAL() actually uses the current form CA alias and not some other. Because the same field name could be in more than one CA aliases.
>
>As to your questions, I don't know how to get "YourCA" value.
>
>Thanks.
>
>>I don't use CA, but I use Help frequently. May I guess YourCA.Alias?
>>
>>>Hi,
>>>
>>>On a typical form of my VFP 9 application, at design time, I drop various textboxs (this is simplified). The class of the "textbox" has a method .Validate(). This method has to check if the value in the field has been changed. I can easily get the current value in the text box. But I also need to find the OLDVAL() in this textbox. To do so, I would need the alias name of the CA (Cursor Adapter) for this particular form.
>>>Could you suggest a generic way to get the alias name of the CA, on any form, for a textbox?
>>>
>>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform