Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Indexing a Cursor
Message
From
24/09/2001 23:20:08
 
 
To
24/09/2001 22:31:31
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00560265
Message ID:
00560364
Views:
20
>
>This phantom is around since 2.0 or so - most of the time you can index a cursor any way you like, but sometimes you just can't.
>
>The way around is to use a nondefault name for the .cdx file:
>
>
cCdx=[ your favorite temp file name generator here]
>Index on cThis+cThat tag Name1 <b>of (cCdx)</b>
>
>And that's it. The index will get deleted when the cursor is closed, at least now that I tried (in VFP7) - I seem to recall this was a problem in some previous versions.

Related to what you're saying, I have a theory about why this is happening. (I may be way off base here...) When you create an index on a cursor, it is actually creating a temporary file in your work directory with a unique name assigned by VFP. If you are working on a large application that uses alot of indexed cursors, and the work directory starts to get cluttered with files that never got cleared out because of crashes and what have you, I could see this problem happening on an intermittent basis. It's best to define a tmpfiles directory and make sure it's clean every once in a while.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform