Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount bug?
Message
 
 
À
22/11/2000 10:26:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00444616
Message ID:
00444622
Vues:
16
>I am having a problem with the RECCOUNT() command in vfp6.
>RECCOUNT() returns an incorrect number when the table you are querying has a tag set on DELETED() and a tag on the field the is contained in the WHERE clause.
>
>Here is an example that should reproduce the problem:
>******************************************************
>
>SET EXCL ON
>
>CREATE TABLE test;
> (trn_type C(10),;
> trn_cust C(10),;
> trn_loc C(10);
> )
>
>insert into test(trn_type, trn_cust, trn_loc);
> values("INV", "12345", "45678")
>
>***********This should return 0 records************
>SELECT * FROM test ;
> INTO CURSOR temp ;
> WHERE trn_type = 'ORD' and not deleted()
>***************************************************
>
>messagebox("RECCOUNT = " + alltrim(str(RECCOUNT())))
>
>sele test
>
>***********Now set a tag on deleted() and trn_type
>inde on trn_type tag trn_type
>inde on deleted() tag deleted
>****************************************************
>
>*****Rerun the Query -- Should return 0 records*****
>SELECT * FROM test ;
> INTO CURSOR temp ;
> WHERE trn_type = 'ORD' and not deleted()
>****************************************************
>
>messagebox("RECCOUNT = " + alltrim(str(RECCOUNT())))
>
>*****WHY????****************************************




Your second query is fully Rushmore optimazable and Foxpro creates filtered view of original table.
Type ? dbf() in command wimdow and you will see original table name.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform