7 |
The LA Fox Developer Newsletter
|
April 1998
|
Outer Joins
(Con’t from page 4)
Join
-
that
is, you will get all the records from the second (right)
table and only matching record from the first (left) table. In our
example the end result will be
A Arnon Gal-Oz
BTom O’Hare
C Michel Fournier
D Scot Becker Elliot
FULL OUTER JOIN
-
as its name implies this will have the non- matched and matched records from both table. In our example the end result will be
AArnon GaI-Oz
B Tom O’Hare
C Michel Fournier
0 Scot Becker
E Paul
Elliot
Note that we
did
not get a key for “ELLIOT’ in the RIGHT and JOINs this is because out orifinal SELECT statement is SELECT A.Key and A does not have a key for Elliot to solve this in the RIGHT JOIN all we have to do is change the SELECT to B.Key... instead, but this will not work in the case of the FULL join
-
because then we.will not have a key for “PAUL”, if we do a FULL JOIN we need to use a
HF
tro the fields in the JOIN condition (if we want them as part of the result) in out example it will look like:
SELECT llF(A. Key#” “,A. Key, B. Key),A. name,B.fname FROM A FULL JOIN B ON A.Key==B.Key
And naturally u can play with this and with FoxPro ability fo sub-queries to get only nomatching record etc. etc.
|
Polymorphism
(Con’t from page 4)
polymorphism work any differently than this article is
describing? Well, what could happen (and does sometimes in other languages) is that without polymorphism, if you sent a double
click message to the child’s form, the base class code would
fire (not the child’s), which is not what you want. The fact that polymorphic behavior is automatic(that is, you don’t have to create any special functions for polymorphism to work correctly as you do in other languages like C++), is a nice benefit of using VFP.
Okay, back to the code above. If you change the CREATEOBJECT to:
oExample=CREATEOBJEcT(”PARENT’)
oExample.Show()
READ EVENTS
and then double click the form, you’ll see the WAIT WINDOW for the parent. Sounds good, right? Pretty easy, right? That’s all there is to it!!!
Omitting code in a class
What would
happen if we used:
oExampte=cREATEOBJEcT(”cHILD”)
/oExample.Show()
READ EVENTS
and we left out the procedure for the DBLCLICKO procedure? Simple. The code for the next member up the class hierarchy is called. Thus, you’d see the WAIT WINDOW for parent again. If
there is no code in the method code for the object you’re double
clicking VFP looks up the class hierarchy for method code it can execute. When VFP finds method code for double click up the hierarchy it executes it!
|
company, if your company has paid for the conference.
MESLLC takes no responsibility in this area.)
Total rebate will be paid during the conference or no later than August31, 1998.
|
PageWatch has been added to all conference website pages that we anticipate either changing or updating periodically.
monitor the page on which it appears, fill in your e-mail address and operating system in the form provided at the bottom of :hese pages. When the page is either changed or updated, you will be notified by e-mail. Now you have no excuse for missing conference-related news. <g> Just point your browser to
http:ll
mesllc com/con f98 html.
|
Page 7
|
7 |