RavindraPatil


Hi all,

One of my client is using my inventory program (developed in FoxPro 2.6 for windows) for last 4 years without any problem.

Two days before client's computer operator reported to me the following situation;

"I just turned on pc. First thing I did after that is I started your program and suddenly got an error message 'FILE IS IN USE BY ANOTHER' and stopped on the line 'INDEX ON CO_NO TO COMPANY' from the .prg file."

I approached the client's office and had a look on the code and made sure that the dbf is opened exclusively in that workarea.

I tried to run the program and got th same error message as reported above.

When I came out of foxpro by cancelling the program, System Tray ballooned up the message 'FILE COMPANY.IDX FILE IS CORRUPTED. RUN CHKDSK/F'. When I tried to run the CHSDSK /F from the DOS Prompt, It gave an error mssage;

'CANNOT LOCK CURRENT DRIVE.

CHKDSK CANNOT RUN BECAUSE THE VOLUME IS IN USE BY ANOTHER PROCESS.'

What should be wrong with it

Please help me.




Re: File is in use by another

Darren Woodford


What version of Windows is this

IIRC since XP, Windows has automatically suggested a chkdsk on reboot when it can't get exclusive access.

Try scandisk if it is an older version. Also try temporarily disabling any realtime antivirus protection on the drive to be scanned.

If the .idx file is corrupted just delete it as that is the index file you are trying to create anyway.






Re: File is in use by another

Lakshmi N

Hai,

first delete the idx file. then go to fox and open the file using USE <FILENAME> EXCL

THEN recreate your idx.

if the file does not open, then file may be corrupted. then use filefix to fix the erros in the dbf. recreate the idx.

it should work fine.