Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery, Index and Transaction
Message
De
21/02/2002 07:08:21
 
 
À
21/02/2002 06:40:01
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00622396
Message ID:
00623055
Vues:
48
>Hi Gregory, Hi Vlad
>
>stupid person I am.
>
>George you put me back to thinking again (like with height).
>
>You wrote
>>
>>use SomeView
>>index on bintoc(dossier) tag xx
>>index on name tag name
>>?juststem(dbf())==juststem(cdx(1)) && TRUE
>>=requery()
>>?juststem(dbf())==juststem(cdx(1)) && FALSE
>>....
>>
>I was over this point since the start of this thread.
>
>We see after Requery() those .F.
>
>Do we trust in MircoSoft? What do they say in Help on CDX() ?
>A
>Name of stuctured indexfile is allways the name of the DBF()
>But we see it is not and it act like a stuctured index, at least for transaction.
>
>B
>So what says index:
>The use of TAG...OF cdxfilename you will get a non structured indexfile
>
>If A is wrong way not B to?
>
>I do test (I don't ever catch 'SourceType'=2, so test yourself) in SortIt()
>
>IF CURSORGETPROP('SourceType')=1;
>  AND !EMPTY(CDX(1));
>  AND !JUSTSTEM(CDX(1))==JUSTSTEM(DBF()) THEN
>
> INDEX ON ;
> &lc__SortExpr ;
> TAG (.gcCurrentTag)  OF (CDX(1)) ADDITIVE
>
>ELSE &&CURSORGETPROP('SourceType')=1
> INDEX ON ;
> &lc__SortExpr ;
> TAG (.gcCurrentTag)
>ENDIF &&CURSORGETPROP('SourceType')=1
>
>
>Now all is fine. ::)
>
>Agnes

Agnes,

seems like you have nailed it

do you need the
 AND !JUSTSTEM(CDX(1))==JUSTSTEM(DBF()) 
I do not think you do in this construction, ie whenever there is a cdx(1) you keep adding to it, since we have seen that (1) requery changes the dbf() and (2) we can do a begin transaction after a requery without any problems
IF CURSORGETPROP('SourceType')=1;
  AND !EMPTY(CDX(1));
 THEN
 INDEX ON ;
 &lc__SortExpr ;
 TAG (.gcCurrentTag)  OF (CDX(1)) ADDITIVE
ELSE &&CURSORGETPROP('SourceType')=1
 INDEX ON ;
 &lc__SortExpr ;
 TAG (.gcCurrentTag)
ENDIF &&CURSORGETPROP('SourceType')=1
All in all, you are the one that solved it
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform