>Larry,
>
>The index on creates a temporary file on the hard drive doesn't it? If I use, I think a sys(2015) call (I have the proper one in another email) to create a unique name, then I need to erase those files on exit, correct? I guess I worry that if the program goes "cafluey" and crashes or the users computer reboots or something, those stray files that didn't get erased because of improper program end, will be left out there in limbo. That is why I am hesitant of writing things I don't need to the hard drive.
>
>Pete
Pete,
Yes it does create a new file on the hard drive. However, all you really need to do is in the initial application load, clean up any files that are left over from the previous sessions.
close databases all
lctemp = sys(2023)
lcfile = sys(2000,sys(2023)+'\*.cdx')
do while !(lcfile == "")
delete file (lctemp+'\'+lcfile)
lcfile = sys(2000,sys(2023)+'\*.cdx')
enddo
This will an infinite loop if a file can't be deleted for some reason. However, since the close database all closes all tables and their indexes, it should work for you.
Note: You don't need to create a unique name as the INDEX ON command does this using the unique name of the cursor returned from the SELECT command.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao