Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count of records in filtered cursor?
Message
 
 
À
28/10/2001 12:07:09
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00574206
Message ID:
00574251
Vues:
26
This message has been marked as the solution to the initial question of the thread.
Than COUNT still your only option. After you issued SET FILTER use COUNT w/o any parameters to get number of records. Don't forget to issue LOCATE/GOTOP to move record pointer back to the first record in the filtered set.

>The SELECT-SQL is what I used to create the cursor originally. After the cursor is created, as the user fills in a text search box, the SET FILTER fires with each keystroke minimizing the displayed records for only those that have the search string anywhere within 3 seperate fields.
>
>
>>Hi Piter,
>>
>>The status bar shows RECNO()/RECCOUNT() of the current workarea which are not affected by set filter. AFAIK, the COUNT command is only way to get number of records in the filtered set. Did you consider using SQL Select instead of SET FILTER? If conditions are Rushmore optimizable you'll get filtered set but _TALLY will have the number of records in it.
>>
>>>I have a very changeable cursor that is based off of what is typed (interactively) in a text box... it limits the displayed records to text matches of 3 different fields in the cursor. I would like to return the number of records that are display (matches) as this changes. I have it working by calling an identical COUNT FOR expression TO where the expression is the same as the filter expression and storing the result in the TO. It just seems that there might be a quicker, less cpu taxing, way of doing that... like a reccount() except that only shows ALL records in the table, not the filtered ones. I noticed when I was running this from the Project Manager that the status line listed #### records as I ran the form. This appears to be the number of records in the filtered set... where does THAT come from then?
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform