8 |
The LA Fox Developer Newsletter
March 1999
FoxPro Q&A
(Con't from page 4)
DH
-
That’s sort of the way to do it. One problem that arises is
when you nuke the backlink, VFP doesn’t think there are any
long names in the table any more, so indexes based on those
long names can’t be recreated using this scheme. Also, al-
though it’s not common, if any index expression uses a UDF
from the stored procedures, that won’t work either. I’m not sure
I’d agree with “pretty easy” and “simply”
—
most folks get kind
of nervous when accessing tables at this low-level.
GD
-
That’s a good point. Its something I don’t do (long field
names), so I haven’t run across the problem before. Another
way I’ve done it is to remove the backlink and the CDX flag from
the header, rename the table, recreate the table from my
GENDBC
-
generated program, and then append from the
renamed table. I like the way I described here better, though the
GENDBC way gets around the problem you mentioned. Gener-
ally, it’s easier to let VFP handle all that stuff and work with
records and fields in tables, rather than bytes in binary files. But
working with bytes in a file is no more difficult than records in a
table. Yes, you have to bone up before trying it the first time,
but that’s true of everything else we do too, isn’t it?
DH
-
If the CDX file doesn’t match its definition in the DBC
(which can happen under a variety of conditions), VFP may not
allow you to open the table to recreate the indexes.
GD
-
Remove the DBC pointer before indexing, and then putting
it back will temporarily disable the rules. If you’re interested in
saving yourself about 100 hours of effort, you might want to take
a look at Stonefield Database Toolkit (SDT). In addition to
providing a completely automated way of recreating indexes,
SDT does a whole lot of other things
updating table structures
at client sites, repairing corrupted table headers, allowing you to
define extended properties for database objects (such as field-
level security), etc. There’s a demo of SDT called SDT.EXE in
the Helpful Utilities library here in VFOX on Compuserve. If you
have any questions, please call me at 1-800-563-1119 or drop
me a line here.
(Doug Hennig, CIS ID: 75156,2326) & Gary DeWitt, C/S ID:
73512,57)
MS Announcements (Con't from page 5)
1999, you will receive a free* upgrade to Office 2000 when it’s
available. *Cost of shipping, handling and sales tax will apply.
For details visit us on the website at http://www.microsoft.com/
socal.
“Just think how much deeper the ocean would be if
sponges didn’t live there.”
Relations
(Con’t from page 3)
SELECT QUESTIONS
GO TOP
DO WHILE .NOT. EOFO
Ialtems(1 ,ImCount)
=
ImCount
Ialtems(2,ImCount)
=
QUESTION
ImCount
=
ImCount
+
I
IF ImCount> 22
EXIT
ELSE
SKIP
ENDIF
ENDOO
GO TOP
SELECT SURVEY
laltems is the array variable. It has two columns, one for the
number of the question and the other for the text of question.
Note that there are 22 rows in this array. Because there will be
22 question printed on side one of the answer sheet. ImCount
keeps track of the question number. The last line is to leave the
parent database selected when the DO WHILE is done.
The rest is easy. Just use Ialtems in the report generator to print
the question number and the text for the questions.
[Ed. Note: Joe Pecukonis is an independent consultant and
member of the
Rocky
Mountain FoxPro user group. He special-
izes in manufacturing MRP systems and scientific
uses
for
Fox Pro. His email address is
JoePec@aol.com
and his home
page is
http://members.aol.com/joepec/index.htm.]
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 Barry Lee at CIS# 72723,3422
on Compuserve, or
brlee©earthlink.net.
These articles can be on any FoxPro-related topic, whether it
concerns a new technique you’ve discovered, a certain develop-
ment technique you may favor over others, book reviews, etc.
Editor reserves the right to edit or offer constructive comments
concerning submitted articles and accepted articles shall be
considered to be in the public domain.
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 ‘bout it?
Page 8
|
8 |