Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore, don't get it
Message
De
21/04/2005 10:19:55
 
 
À
21/04/2005 09:14:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01006860
Message ID:
01006991
Vues:
16
Fabio,

I do not have a problem with tables as far as I can see, only with cursors and views

The code below (with the free table )runs correctly


_____________________________

>>Fabio,
>>It's a bug as agreed. Why would I ever reindex it. Assuming there might be a need, yes reindex kills the index but still you can give a kiss and bring it back to life in 2-3 lines of code.
>
>Cetin,
>How do you bring it back to life ?
>With a new table, index and Append the source table !?
>You can write these 2-3 lines ...
>
>But PACK, too, kill the index ! Can you live without PACK ?
>
>Next code close the door ( and open many ????? on the VFP data engine ):
>
>	clear
>	set ansi on
>	set exact on
>	set collate to 'machine'
>	set optimize on
>
>	create TABLE  CursorTest FREE;
>		( 	j_ref		I ;
>		)
>	
>	
>*	create Cursor  CursorTest ;
>		( 	j_ref		I ;
>		)
>	
>	index on bintoc(j_ref) tag j_ref
>	
>	insert into CursorTest values(44 )
>	insert into CursorTest values( 0 )
>	insert into CursorTest values(44 )
>
>	?'-------------------------------------'
>
>
>	locate for (bintoc(j_ref)+' ' == bintoc(0)+' ')
>	?'optimize locate 0 (TRUE)', found(), '  ERROR'
>
>	locate for (bintoc(j_ref)+' ' == bintoc(0)+' ') NOOPTIMIZE
>	?'no optimize locate 0 (TRUE)', found(), ' OK'
>
>	local aa[1]
>	aa[1] = 0
>
>	select count(*) ;
>		from CursorTest ;
>		into array aa ;
>		where (bintoc(j_ref)+' ' == bintoc(0))
>
>	?'optimize count 0 (1):', aa[1], ' ERROR'
>
>	set optimize off
>	select count(*) ;
>		from CursorTest ;
>		into array aa ;
>		where (bintoc(j_ref)+' ' == bintoc(0))
>	set optimize on
>
>	?'no optimize count 0 (1):', aa[1], aa[1], ' ERROR'
>
>
>	locate for (bintoc(j_ref)+' ' == bintoc(44)+' ')
>	?'optimize locate 44 (TRUE), recno 1:', found(), 'OK ', recno()
>
>	insert into CursorTest  values( 0 )
>	locate for (bintoc(j_ref)+' ' == bintoc(0)+' ')
>	?'optimize locate 0 (TRUE), recno 2:', found(), recno(), 'ERROR'
>
>
>>It seems more cumbersome to me to be carefull to add extra space.
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform