| johnnymack 2005-04-21, 3:55 pm |
| I've been able, using the TPS driver, to take advantage of a non
standard use of BUILD(key). Trivial example:
Suppose I'm building a file of my CD collection from scratch (by
reading a text file output from a 3rd party program):
CD FILE,DRIVER('TOPSPEED'),PRE(CD),CREATE,B
INDABLE,THREAD
ByAlbum KEY(CD:Album),NOCASE,OPT
BySongAlbum KEY(CD:Song,CD:Album),NOCASE,OPT
Record RECORD,PRE()
Album STRING(32)
Song STRING(32)
END
Note both keys are unique. I CREATE the file, APPEND all records to it
and then BUILD both keys, ignoring the duplicate key errors. (I can't
ADD nor BUILD(file) because of the duplicate records on the "ByAlbum"
key)
I can code 2 separate browses, one to see just what albums I own and
one to locate a song, using the 2 keys on the same file.
I don't have to create 2 files... nor use just the one file but make
the KEY 'ByAlbum' DUP and do fancy runtime filtering. Very nice, very
easy, very non standard.
When I change the driver to MEMORY, the BUILD(ByAlbum), encountering
the duplicate records, does not work the same, and just seems to bail
out early.
1) Can anyone verify that this is really the case?
2) If so, is there any way to force it to work as it did on TOPSPEED
files? It was so handy....
p.s. I'm neither surprised nor upset, just a wee disappointed.
|