Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I'm singing the non indexing view blues
Message
De
07/10/2000 13:40:58
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00426336
Message ID:
00426502
Vues:
22
Thanks Vlad

Your suggestions have pointed me in the right direction.

However I do need table buffering because this app my be upsized.

I followed your suggestions below here is my code

CURSORSETPROP("BUFFERING", "v_tickitm", 3) && row buffering
SELE v_tickitm
INDEX on seq tag seq OF (c:\temp\test) ADDITIVE
CURSORSETPROP("BUFFERING", "v_tickitm", 5) && table buffering
=requery('v_tickitm')
set order to tag seq in v_tickitm
if order('v_tickitm')<>'SEQ'
error 'Order is not set to SEQ'
endif


This works fine but later on I find my index has vanished again and I am having trouble finding out at what point this is happening.



>I wondered because we use indexes on views very often and they work. However, we use non-compound indexes, that always stored on disk.
> The way we use indexes for views is following.
>1. Index view only when you open it. Command should be following:
>INDEX on seq TAG seq OF (m.lcMyTempFile) ADDITIVE
>2. Open view with NODATA clause, index it, that use requery to query real data.
>3. Assure that view do not have table buffering mode (4 and 5). When you still need table buffering mode, set row buffering temporarily, index, that set table buffering back. This because non-compound indexes do not like table buffering mode.
>
>>Is a disk presence required before I can create an index? because I notice that the view only appears in memory and not on disk. This might be my problem.
>>
>>If so how do I force a disk presence since it does not appear in the view designer.
>
> No, it is not required. AFAIK, you can index any non-readonly cursor that may be in memory.
> Finally, try also 'set step on' before index command and step 'into' index command. Maybe you have some error handler, so you do not see error message? ;)
>
>

>
>>On one of my views I need an index but the index keeps vanishing after I have created it.
>>
>>It is a small view. I create the view then create the index with
>>
>>INDEX on seq TAG seq
>>
>>This works with no error messages but no index results afterwards.
>>
>>SET ORDER TO TAG SEQ produces no error message.
>>
>>the ORDER() command returns an empty string
>>
>>Using SET to check the data environment does indeed show there is no index on the view.
>>
>>Is a disk presence required before I can create an index? because I notice that the view only appears in memory and not on disk. This might be my problem.
>>
>>If so how do I force a disk presence since it does not appear in the view designer.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform