Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non-structural index getting created w/o OF CDX
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00062329
Message ID:
00062527
Views:
24
>>>I have view definitions in the dictionary that are run in the app and then indexed with the following command after selecting the proper view.
>>>
>>>INDEX ON &lcIndex TAG &lcTag ADDITIVE
>>>
>>>I do believe that this is supposed to create a structural index file with the same name as the table or in this case, the view. These views are not used for updating anything at this point and are used to locate specific records for a user. After the user has found the specific record, then performed an update (on the buffered table), I'm finding that the BEGIN TRANSACTION causes an error with the message;
>>>
>>>V_??? (viewname) has one or more non-structural index files open.
>>>
>>>This is with private datasessions, but the mystery is how is it that non-structural indexes are being created for these views with a structural index command? I need to get rid of this.
>>>
>>>Thanks,
>>>Steve Despres
>>
>>Additive is used when creating non-structural indexes. And form VFP Help, Additive means that all other open non-structural indexes will be left open when the new non-structural index is created. If Additive is omitted, all open non-structural index files will be closed. Any structural index will, of course, remain open. Can a view really have a structural index? I tried this once, and the next time I opened my database and the view, it corrupted my .DBC. I have avoided them ever since.
>
>I mis-interpreted your question, I think. I still think the problem is that you are trying to index (non-structural) a view and keep the index current by "USE ViewName Index CDXName" Have you had any luck doing this? Is this really possible? It would be nice to be able to RELIABLY do this as I have had a need to set a relation into a view from another table/view, but have had little success. The next time I opened the view, I experienced index problems, and short of opening the view exclusively and reindexing, I could not get this to work in a multi-user environment.

All of my views are requeried via some user input. The are loaded into the DE in the .BeforeOpenTables method with NoDataOnLoad = .T. When they are requeried, they are indexed automatically with the above command. BTW, I did remove the ADDITIVE but still get the problem. I do not issue any USE statements in code as .AutoOpen = .T. in the DE. My only work around has been to issue CLEAR INDEXES. I just don't understand what type of index I'm building anymore.....and to think, I thought I knew at least a little bit about VFP.....hahahahaha.

Steve
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform