9 |
The LA Fox
Developer Newsletter
April 1995
President’s Column
(Con't from page 3)
leading FoxPro author, speaker, and trainer
—
they
don’t come any better than this ! The tour hits Los
Angeles on May 8 and 9. The price is $250 per day
with several discount options. You can register at
800 331-9434.
The annual dDay Fair is happening again this year.
This is a major opportunity for local database
oriented folks to meet and listen to several industry
leaders, all in one convenient place, without the
hassle and the price of most database confer-
ences. The date is June 24, and the place is the
Warner Center in Woodland Hills. The price is right
-
$25. We will have order blanks at the meeting
-
or
call (818) 889-7022.
Browse
(Con't
from page 8)
SET EXACT OFF
BROWSE for
main.direction
=
m.direction AND
main.streetype
=
m.streettype AND
main.houseno
•
m.houssno
KEY
m.street
My assumption is that the street name is the item
which is most likely to be known. When running the
program however, bad response became an issue. If
I entered “CANNON” as the street name with every-
thing else empty, response was fast. If I add I
character to ANY other field, things got slower. Two
characters made it slower still.
In trying to debug the problem I created a small
function which always returned TRUE, but added one
to a local variable. I put this function in the BROWSE
FOR clause so that after the browse was through, I
could see how many records were being compared in
the FOR clause of the browse. Sure enough, the more
thardcters entered in houseno, for instance, the more
records werø being compared in the FOR clause, until
a full Table search was being performed. I knew that
there were 100 records with a street name of “CAN-
NON”, but all I million records were being searched.
This is not what I expected at all, but fortunately the
solution is very simple.
PUT THE KEY CLAUSE IN FRONT OF THE FOR
CLAUSE, and life will be good again. Imagine that!!!...
(Con't page
5)
Hot Tip....
Drive/Directory in FoxPro
by George Dvorak
The test for the existence of a drive or directory is:
?FILE('C:\DOS\nul')
This returns .T. in FoxPro DOS 2.6, FoxPro Windows
2.6, and the beta of Visual FoxPro that was given out
at Devcon.
However if the drive and/or directory does not exist,
as in:
?FILE(Z:JFLKDSFJSAL\nul')
The return in FoxPro DOS 2.6 and beta Visual
FoxPro is .F., BUT the return in FoxPro Windows 2.6
is.T.!!!!!
[George’s CompuServe ID is 71140,3527.)
It Can’t Get Any Easier.......
We’ve come up with an easy way to submit articles to
the
LA Fox
Developer Newsletter
one that has
been overlooked for a long time.
You can submit your articles to either Chuck Williams
(72330,2326) or Barry Lee (72723,3422) on
Compuserve.
These articles can be on any FoxPro-related topic,
whether it concerns a new technique you’ve discov-
ered, a certain development technique you may favor
over others, book reviews, etc.
The quality of this newsletter really depends on the
members that support it, not just read it. And I think
we’d all be surprised by the useful information that
could be circulated around the membership.
So.
How’boutit?
Page 9
|
9 |