Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to trap error - File Access is denied
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00694551
Message ID:
00694652
Views:
12
Everything seems to return -1.

I know that these tables are not open by anyone else, because they are test tables that I have control over, yet the file handle returned on every table is -1. I checked to see if I could open a table exclsuively through Visual FoxPro and it opened exclusively. So, I am wondering why everything returns -1 for the following code:

IF NOT USED(lcTableToIndex) && If the table is not already open in this session, open it.
*** 08/28/02. Cecil Champenois.
Local lnFileHandle
lnFileHandle=FOPEN(lcTableToIndex, 2) && Opens in READ/WRITE mode.
IF lnFileHandle > 0
=FCLOSE(lnFileHandle)
* Open the table you want to re-index.
USE oApp.cDefDataLoc + "\" + ;
(lcTableToIndex) IN 0 EXCLUSIVE
ELSE && File cannot be opened for Read and Write mode,
&& since someone else has opened it.
lcMessage = lcTableToIndex + ;
" is in use and cannot be opened exclusively for indexing"
=MESSAGEBOX(lcMessage, 0 + 64, "Table cannot be opened exclusively")
LOOP
ENDIF
*** 08/28/02. End.
ELSE
...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform