Hi guys,
I have a xBrowse where I show rows of a MySql Table. This module is opened in several computers at the same time and records are being modified.
What is the best way to keep updated the rows that are being shown in this xBrowse?
No my friend, oBrw:Refresh(.t) doesn't help.
oRowSet:Refresh()
oRowSet:Resync() // --? lChanged
oRowSet:NetChanged( [RecNo], [@lDeleted] ) // -->lChanged
oBrw:bChange := { || If( oRs:NetChanged(), oBrw:RefreshCurrent(), nil ) }
oRowSet:Resync() // --? lChanged
LOCAL lTem:=.F.,nPos:=0,nRegAt := ::oTab:Recno()
DEFAULT bBloco := {|| .T.}
::oTmr:DeActivate()
::oTab:Skip(::oLbx:nRowSel * (-1))
DO WHILE nPos < ::oLbx:nDataRows .AND. .NOT. ::oTab:Eof()
IF Eval(bBloco)
lTem := .T.
::oTab:ReSync()
ENDIF
nPos++
::oTab:Skip()
ENDDO ::oTab:GoTo(nRegAt)
IF lTem
::oLbx:Refresh()
ENDIF
::oTmr:Activate()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 67 guests