Page 1 of 1

Update xBrowse automatically

Posted: Wed Oct 20, 2021 1:33 pm
by Otto
Dear Mr. Rao,

How can we automatically update an xBROWSE if someone in the network has changed a data record?

Best regards,
Otto

Re: Update xBrowse automatically

Posted: Wed Oct 20, 2021 4:28 pm
by gabo
Otto
maybe this way using a timer

Code: Select all | Expand


//------------------------------------------------------------------------------
METHOD TimerDetail( oSender ) CLASS TFormVentas
  LOCAL nTotRecno

  nTotRecno:= oMySQLDS:Query("SELECT count(*) AS nTotRecno FROM ventas_historico")
  IF nTotRecno!= ::oSQLVentas:RecCount()
     ::oSQLVentas:Refresh()
  ENDIF
  ::oTimerDetalStop()
RETURN Nil
 

Regards!

Re: Update xBrowse automatically

Posted: Thu Oct 21, 2021 6:59 am
by nageswaragunupudi
Otto wrote:Dear Mr. Rao,

How can we automatically update an xBROWSE if someone in the network has changed a data record?

Best regards,
Otto


I assume you are referring to DBF tables. DBF RDD is the fastest database system and modifications to data are immediately known to all exes. Only we need to call Refresh().

Method-1:
Simple and well known way is the refresh with a timer. You wont even see a flicker. But, changes are not seen till next timer interval.

Method-2:
Push notification: Post message to all xbrowse windows whenever the DBF is modified.
Programming is a little involoved but can be done.

Re: Update xBrowse automatically

Posted: Thu Oct 21, 2021 9:06 am
by Marc Venken
I wonder if a timer running on the background will slow down the general performance of the computer ?

Re: Update xBrowse automatically

Posted: Thu Oct 21, 2021 10:50 am
by Otto
Dear Mr. Rao,
Thank you so much.
Do I create the timer in the function where xBrowse is local and destroy it after closing the function?
Would 1 sec. be ok?
Best regards,
Otto

Re: Update xBrowse automatically

Posted: Sat Oct 23, 2021 8:07 pm
by James Bott
Otto,

It is going to be continuously updating if it takes more than one second to redisplay the entire browse (especially if you are doing this over the internet).

Consider instead, just adding a Refresh button.

Re: Update xBrowse automatically

Posted: Sun Oct 24, 2021 5:34 am
by Otto
Dear James,

In reality, I do not need it for a network application in the classic sense.

Our customers all work via RDP on their servers.
WINHOTEL is, so to speak, similar to a single-user solution.

Now I want to use FIVEWIN and mod harbour in parallel.

See attached GIF.

When I briefly change the focus, for example from the browser window to the menu bar, the data is updated immediately.

Best regards,
Otto

Image

Re: Update xBrowse automatically

Posted: Sun Oct 24, 2021 5:47 am
by Otto
Here is my function how I start Chrome from FIVEWIN.

Image

Re: Update xBrowse automatically

Posted: Sun Oct 24, 2021 6:02 am
by Otto
Here you see the mod harbour code for showing Googlemaps.
If there is interest, I can continue to show more of the mod harbour code.

Image

http://forums.fivetechsupport.com/viewtopic.php?f=45&t=40946&sid=c6d5840853f3697a1e3c95f89562e5ae