Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View parameter used in outer join
Message
De
23/03/2007 10:31:02
 
 
À
23/03/2007 01:02:14
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
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
Divers
Thread ID:
01206850
Message ID:
01207663
Vues:
18
>>>I have this working but I am curious as to why.
>>>
>>>I recently had to modify a view. Moved the view parameter from the WHERE clause to the OUTER JOIN.
>>>
>>>The view is opened NODATA in the form's dataenvironment. Of course it blew up the first time I ran the form (issued prompt for a value for the view parm). I figured out that since the parameter is now in the join, the paramater is being evaluated when FoxPro is creating the structure for the view even thought the view is opened NODATA.
>>>
>>>So I got it to work by declaring the view parm LOCAL in the form's OpenTables method, but here is my question:
>>>
>>>Why do I also need
>>>
>>>NODEFAULT
>>>DODEFAULT()
>>>
>>>I thought that baseclass code ran automatically?
>>>
>>>TIA
>>
>>NODEFAULT and DODEFAULT() are complete opposites. The first prevents running the parent event or method of the object. The second runs the parent event or method of the object.
>>
>>I don't think the parent code is ran automatically if you place any code in the event or method of the object. It overrides the parent code. That's why I usually add a DODEFAULT() somewhere in the event or method if I want the object to also run the event or method of the parent of the object.
>
>Actually it's a bit more complicated than that.
>
>Any code in the event code will override the parent class code but will not override the native behavior of the event, i.e. the button will still look depressed when it's clicked, a keypress will still be passed to the control etc. NODEFAULT suppresses the native behavior.
>
>Dodefault() calls the code in the parent class, i.e. the code which we have overridden.
>
>This means that a combination of nodefault and dodefault() isn't senseless; it means "don't run the native behavior for this event" and "run the parent class code for this event".

But that is the curious part, there is no parent class code. It is native DE. Your explanation was my understanding also, but it doesn't make sense to me in this context. I guess I just need to find the time figure out the exact sequence of things.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform