Hi
I encountered inconsistence in using the (USE IN file) command,
First, I tried to use SQL Select command to output my result to a dbf file, then tried to close both open file show below by using (USE IN) command. Then tried to reopen one of the file again. Vfp will report that the file is in used. Didn't I had close both open files in the first place by using (USE IN) command.
Next, after using the command (USE (loutputfile+'cas') in 0 EXCLUSIVE) command, (SELECT cas) command will give me Alias cas not found. The use command in th first place didn't give any error.
Please advise or comment, did I miss out any thing. Thank you.
Below is my code
SELECT * FROM cas a INTO DBF ;
(loutputfile+'cas');
WHERE YEAR(closing) = lYear
USE in cas ---------- cas in outputfile folder close ?
USE IN a -- cas in current folder close ?
USE (loutputfile+'cas') IN 0 EXCLUSIVE ----no error given
SELECT cas ----cannot select alias
INDEX ON DTOS(closing)+outlet_id TAG outlet_id OF (loutputfile+'cas')
INDEX ON DTOS(closing)+outlet_id+cascode TAG cascode
USE IN CAS
USE (lFolder+'cas') IN 0 exclusive
SELECT cas
DELETE ALL FOR YEAR(closing) = lYear
PACK
USE IN cas
Best Regards
Virusim