General information
Category:
Coding, syntax & commands
>>>>Is there any way to count records in a buffered (mode 5) view without moving the record pointer?
>>>
>>>Check new WITH (buffering) option of Select-SQL. I'm not sure how does it work internally and it is a slow option, be aware.
>>
>>Thanks! These record sets are small so speed is not an issue.
>
>You may also
>
>select 0
>use (dbf("myalias")) again alias (sys(2015))
>count to x
>use
>
>Not sure it would exactly work - i.e. it will work, but I'm not sure it will share the buffers (and give the right count), but if it does, it costs almost nothing in resources, and it has its own order (in case indexes exist) and record pointer. If there's a filter, you may need to reapply it, because filter applies to alias.
>
>Didn't try this approach for a while - from the last time I did, I remember that changes to one alias were reflected in the other immediately, but can't be sure whether any buffering was involved then.
Seems like there should be an easy way to do this like reccount could have a parameter to respect "set deleted" or something. Oh well... Got it done. Thanks!
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only