PeterHarmes wrote:I use xBrowse with SQLRDD and can confirm that it works - there are issues with OrdKeyCount() & OrdKeyNo() as nageswaragunupudi says - the only area i have found to be a problem is the "hot key" seeking in a browse.
Regards,
Pete
Opened orders table - has 7621 rows
Lastrec() returns 7628 which is the largest value in the column sr_recno (where the record number/row number) is stored.
Function SR_OrdkeyCount(xOrder)
Local nItem:= 0, nRecno:= Recno()
Local nOO:= OrdNumber()
OrdSetFocus( xOrder )
DbGotop()
DbEval({|| nItem++ })
OrdSetFocus(nOO)
DbGoto(nRecno)
Return nItem
Function SR_OrdkeyNo(xOrder)
Local nItem:= 0, nRecno:= Recno(),nKey:= 0
Local nOO:= OrdNumber()
OrdSetFocus( xOrder )
DbGotop()
DbEval({|| nItem++,Iif(Recno() == nRecno, nKey:= nItem,nil) },,{|| Empty(nKey) } )
Iif(Empty(nKey),nKey:= nItem,nil)
OrdSetFocus(nOO)
DbGoto(nRecno)
Return nKey
// Initially
aRows := {}
(cAlias)->( DbGoTop() )
(cAlias)->( DbEval( {|| AAdd( aRows, RecNo() ) } )
(cAlias)->( DbGoTop() )
// normal xbrowse code
@ <r>, <c> XBROWSE oBrw COLUMNS .....<other clauses> ..;
ALIAS cAlias ROWS aRows // Please note the clause ROWS aRows
@ <r>, <c> XBROWSE oBrw
oBrw:SetRDD (. f.. f.)
oBrw:bKeyNo := {|| ( ::cAlias )->( SR_OrdkeyNo() ) }
oBrw:bKeyCount := {|| ( ::cAlias )->( SR_OrdkeyCount() ) }
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Marc Venken and 103 guests