It works just like the Clipper with Six test I did earlier.
I am going to use this on some of my history databases and see what happens.
You have to be careful which count functions you use if the database is using a range and filters.
For instance in Comix/Clipmore the cmxkeycount() and the cmkeycount() act a little different. Below is the description of the cmkeycount() function.
Code: Select all | Expand
Description
cmKeyCount() is similar to cmxKeyCount(), but returns the number of keys
which meet the filtered condition in the current master index.
(cmxKeyCount() returns the "raw" count regardless of the filter).
If the index is not conditional (i.e., no FOR clause), this is the same
as the number of records which meet the condition.
If the index is conditional, this will be the number of records which
meet the filter condition and meet the FOR condition of the index.
cmKeyCount() will force Linear Optimization to be performed so that the
count returned is fully accurate.
cmKeyCount() obeys the current index scope (if any). I.e., it will only
count the number of keys for the current index which meet the condition
_and_ fall within the current index scope.
I modified tsbrowse to include the rmdbfcdx driver from xHarbour.com
xHarbour.com includes the functions from Comix/Clipmore and Six/MachSix drivers, but I pretty much use the Comix/Clipmore ones.
Code: Select all | Expand
Elseif cRDDName == "RMDBFCDX"
::cDriver := cRDDName
::bTagOrder := &( "{|uTag|OrdSetFocus(uTag)}" )
cType := Type( "cmKeyNo()" )
::lClipMore := .t.
::bKeyNo := &( "{|cTag|cmKeyNo(cTag) }" )
::bLogicLen := If( ::lFilterMode,;
{||(::cAlias)->(Self:RecCount(::uValue1))}, ;
&( "{|cTag| cmKeyCount( cTag ) }" ) )
::bGoToPos := &( "{|n| cmKeyGoTo( n ) }" )