> I import 30+ files from an old DOS Business Basic system every day and convert them to VFP files.
> At the end of the import I have a 'wrapup' program to handle little details as I prepare to install the final system.
> After months of no problems, in the last week I've gotten two 'file access denied' errors in this last program.
> The program runs on 5 different standalone computers as people update from the files on a daily floppy disk.
> Two errors, each involving different files. No DE, no buffering, just a simple PRG.
>
> Here's the code for one of the errors.
>
>
> IF !USED('invproduction')
> USE invproduction IN 0
> ENDIF
> SELECT invproduction
> REPLACE ALL lbooked_prod WITH .t.
> REPLACE ALL drec_activity WITH dprod_dt
> USE
> |
> | other code, other files
> |
>
SELECT distinct dprod_dt FROM invproduction INTO CURSOR crdt ORDER BY dprod_dt
> produces error (once)
>
> Is this perhaps some kind of timing issue? Should I issue periodic FLUSHes in the code?
> I can't reproduce the error, so it's hard to know the best approach!
>
>
> Terry
I Hope you have
SET EXCLUSIVE OFFforce the file to open in share mode. This thing will open your file in same workarea and automatically closed your file if open and if its not open than its only open the table in fresh workarea.
USE invproduction again share in SELECT("invproduction")
and from that code of piece which your provide. i dont think so here experts can judge more?
Anil
My Blog