home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky bit.listserv.dbase-l:1168 comp.databases:7745
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!neoucom.edu!aldhfn!saxon!fletcher
- From: fletcher@saxon.UUCP (Edward F Eaglehouse)
- Subject: Re: Clipper 5.01 dbcreateindex() problem
- Newsgroups: bit.listserv.dbase-l,comp.databases
- References: <1d6ua3INNk4d@mizar.usc.edu>
- X-Newsreader: TIN [version 1.1 PL6]
- Message-ID: <fletcher.026b@saxon.UUCP>
- Date: 7 Nov 92 22:02:49 EST
- Organization: Auldhaefen Associates
- Lines: 21
-
- The problem I have found is that the expression and the code block MUST
- MATCH EXACTLY, else dbcreateindex() calls the function once, sees that they
- don't match, and promptly aborts.
-
- There was an article in Data Based Advisor in the Clipper column by Rick
- Spence that addressed this issue. It is also in the reference book "Clipper
- Programming Guide, 3rd Edition, Version 5.01" by Rick Spence (a nice book to
- keep on your shelf). For anyone interested in picking this up, it is
- published by Microtrend Books (Slawson Communications, Inc.).
- ISBN 0-915391-68-6.
-
- Basically what you do is add a UDF to your key expression that displays your
- progress bar (RECNO() / LASTREC() * 100.0 gives a percentage). When the
- indexing is complete, use the low-level file functions to read the indexing
- expression from the index file (close it first), remove the UDF at the end
- of the key expression, and rewrite it. The expression starts at offset 22
- (23rd byte) in the NTX file and is a maximum length of 256; the expression
- is terminated with a null byte.
-
- Note that the indexing expression is always called once with RECNO() at EOF
- before indexing actually starts.
-