Update xBrowse automatically

Update xBrowse automatically

Postby Otto » Wed Oct 20, 2021 1:33 pm

Dear Mr. Rao,

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

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Update xBrowse automatically

Postby gabo » Wed Oct 20, 2021 4:28 pm

Otto
maybe this way using a timer
Code: Select all  Expand view

//------------------------------------------------------------------------------
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!
gabo
 
Posts: 128
Joined: Tue Jan 03, 2006 8:31 pm

Re: Update xBrowse automatically

Postby nageswaragunupudi » Thu Oct 21, 2021 6:59 am

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10619
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Update xBrowse automatically

Postby Marc Venken » Thu Oct 21, 2021 9:06 am

I wonder if a timer running on the background will slow down the general performance of the computer ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Update xBrowse automatically

Postby Otto » Thu Oct 21, 2021 10:50 am

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Update xBrowse automatically

Postby James Bott » Sat Oct 23, 2021 8:07 pm

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.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Update xBrowse automatically

Postby Otto » Sun Oct 24, 2021 5:34 am

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Update xBrowse automatically

Postby Otto » Sun Oct 24, 2021 5:47 am

Here is my function how I start Chrome from FIVEWIN.

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Update xBrowse automatically

Postby Otto » Sun Oct 24, 2021 6:02 am

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests