Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering count without cursor
Message
From
05/02/2009 08:53:48
 
 
To
05/02/2009 08:30:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01379421
Message ID:
01379436
Views:
11
I want to avoid the 'use in cursor' (and to save typing).
_TALLY its like reccount (I think that reccount is better) .
Array takeing me to other typing and problems.
Can I say to fox:
ccount=getfiltercount("select distinct id from mytable;
where between(mytable.id,1583,1927);
and mytable.state=='NY'")
thisform.txt.value=ccount


function getfiltercount
lparameters cquery
&(cquery+' into cursor tmp1 nofilter')
icount=reccount('tmp1')
return transform (icount)
endfunc



>>Hi all,
>>Can I run query and to retrive the rows count without cursor, or I must as following:
>>
>>local itotal
>>select distinct id from mytable;
>>	where between(mytable.id,1583,1927);
>>	and mytable.state=='NY' into cursor mycursor nofilter
>>itotal=reccount('mycursor')
>>myform.txt1.value=transform(itotal)
>>use in mycursor
>
>You could send the result to an array instead, and use ALEN() or _TALLY to see how many rows.
>
>Tamar
Thank you
Chaim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform