Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File is in Use. Yeah We Know. So why USE AGAIN failing?
Message
From
04/11/2003 13:34:42
 
 
To
04/11/2003 12:03:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00846044
Message ID:
00846100
Views:
25
>Anyone see a problem with the code below?
>
>IF NOT USED('CPRIME')
>	USE CALLLOG AGAIN IN 0 ALIAS CPRIME ORDER TAG CALLPRIME DESCENDING
>ENDIF
>
>
>Its been working for months but has suddenly decided not to co-operate and falls over with the complaint that the file is in use. I already knew that dammit! Thats why I used "again".
>
>This would seem to suggest something has gone wrong elsewhere but I haven't a clue where to begin looking...

The problem may be in logic that sets up this command. I presume you are seeing error 3 and not error 108? What have you already discounted? For example, I'd start by breaking the program on the USE command, issue SET from the command line, and check all the open datasessions and aliases.

(edited due to premature send)

I particularly wonder if you have the alias used exclusively in another datasession. For example,
SET EXCLUSIVE ON
CLOSE ALL
SET SAFETY OFF

CREATE TABLE tmpCALLLOG  (CALLPRIME i)
INDEX ON CALLPRIME TAG CALLPRIME

USE tmpCALLLOG

lo=NEWOBJECT('myForm')

DEFINE CLASS myForm AS FORM
  DATASESSION = 2
  PROCEDURE LOAD
    IF NOT USED('CPRIME')
      USE tmpCALLLOG AGAIN IN 0 ALIAS CPRIME ORDER TAG CALLPRIME DESCENDING
    ENDIF
  ENDPROC
ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform