Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reccount bug?
Message
 
 
To
22/11/2000 10:26:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00444616
Message ID:
00444622
Views:
11
>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform