# Data broadcasting between clients? HELP!

**URL:** <https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887>\
**Category:** Classic Servoy\
**Created:** [December 20, 2006, 10:50pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887 "2006-12-20T22:50:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 20, 2006, 10:50pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/1 "2006-12-20T22:50:44Z")

</div>

Hi there.

Our solution finally went live today. However, there’s one nagging issue regarind data broadcasting. I have about 40 different clients running at the same time on ONE solution. I expected that a data entered by one client (or adds a new record) will automatically be reflected on ALL other clients. However, it doesn’t. It seems to work sometimes, then at other times, I could have to close the client and restart in order to see the updated changes.  
If I check the data on my MS SQL database, all the data is updated live. It’s just seems like the Servoy client itself doesn’t show the updated data.

Does someone come across this? Any suggestions. Please help! This is pretty urgent this they are running since in production as I type this.

Thanks

Running MS SQL 2000; Servoy 2.2.4; Sun Java 1.5.0\_02

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 21, 2006, 3:43am UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/2 "2006-12-21T03:43:54Z")

</div>

I did find this thread:

> **[problem with number comma and live update data](https://forum.servoy.com/viewtopic.php?t=6815&highlight=cache)**
>
> Hi, I have 2 ploblem: First, when I enter a number, Servoy understand the comma "5,23" but not the point "5.23". When I enter "5.23" servoy return "5". I know that some country use point to separate number's unit , but in France ',' and '.' in...

However, Is there a way to NOT have to add controller.savedata() to everything. My code is validated and pretty locked in. Perhaps someone know something in the Network setting?

The funny thing is, the client would update live most of the time, then after a few minutes, it would stop updating forcing the other client to have to exit and re-entere Servoy before seeing the updated data. Exiting and re-entering Servoy works EVERYTIME tho when trying to see the updated data that’s created by another client. Please help.  
thanks a bunch!

---

<div class="post-metadata">

**Author:** ![Westy](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@Westy](https://forum.servoy.com/u/Westy)\
**Post date:** [December 21, 2006, 1:54pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/3 "2006-12-21T13:54:32Z")

</div>

I believe the expected behavior is for other clients to update when the client that makes the change changes records. In other words, changing data in a field and just moving to another field does not update other clients.

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 21, 2006, 4:09pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/4 "2006-12-21T16:09:06Z")

</div>

> Westy:  
> I believe the expected behavior is for other clients to update when the client that makes the change changes records. In other words, changing data in a field and just moving to another field does not update other clients.

When I was doing the test in my lab environment (3 clients); I can enter data into one field and the other 2 clients would see the update automatically. that’s why I’m so puzzled why when deployed out to my production environment, this works sometimes, and doesn’t work sometimes and WHY log-out then back into servoy client would fix the problem.

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 21, 2006, 4:55pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/5 "2006-12-21T16:55:04Z")

</div>

> I believe the expected behavior is for other clients to update when the client that makes the change changes records. In other words, changing data in a field and just moving to another field does not update other clients.

This is certainly not expected behavior.

Sammy, I have experienced such a thing back in the early 2.0 days but have seen no complaints since. Strange…[/quote]

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 21, 2006, 5:00pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/6 "2006-12-21T17:00:24Z")

</div>

> IT2Be:
> 
> > I believe the expected behavior is for other clients to update when the client that makes the change changes records. In other words, changing data in a field and just moving to another field does not update other clients.
> 
> This is certainly not expected behavior.
> 
> Sammy, I have experienced such a thing back in the early 2.0 days but have seen no complaints since. Strange…

[/quote]

Hey Marcel, Sorry if my sentense is a bit confusing, but What is the expected behavior?

Is it that all data should be broadcasted instantly without problems? or that broadcasting may have problems unless controller.Savedata() is used throughout the system?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 21, 2006, 9:42pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/7 "2006-12-21T21:42:49Z")

</div>

uhmmm, good question.

I am not really sure here. Normally controller.saveData() shouldn’t be necessary unless you want to be in control of when the data is pushed out. If I am correct a new record selection will force data to be saved…

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 21, 2006, 9:50pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/8 "2006-12-21T21:50:06Z")

</div>

I restarted the Servoy Server then restarted the SQL server (where my repository is) and it everything seemed to work for about 40 minutes, then the delay and lag started happening again.

any other suggestions?

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 22, 2006, 7:33am UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/9 "2006-12-22T07:33:36Z")

</div>

just to correct myself, i’m on java version 1.5.0\_02 on all client

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 22, 2006, 9:14am UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/10 "2006-12-22T09:14:20Z")

</div>

The places where you don’t see the data coming in. Are those related foundsets that aren’t being updated? And if so how many records are in those related foundsets?

And if you do this:

databasemanager.refreshRecordFromDatabase(relatedfoundset,-1)

then the records do show up?

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 22, 2006, 3:19pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/11 "2006-12-22T15:19:29Z")

</div>

> jcompagner:  
> The places where you don’t see the data coming in. Are those related foundsets that aren’t being updated? And if so how many records are in those related foundsets?
> 
> And if you do this:
> 
> databasemanager.refreshRecordFromDatabase(relatedfoundset,-1)
> 
> then the records do show up?

About this code:  
databasemanager.refreshRecordFromDatabase(relatedfoundset,-1)  
I’m not at work yet to see the entire code,but before the user does a data entry, the script does indeed do a foundset first. I’ll try out the refresh database record

DO I see a “blue indicator” or some indicator that the database actually refreshes? I’ll try it out in a few minutes and see what happens. This function is available also in 2.2.4 correct?

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 22, 2006, 4:26pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/12 "2006-12-22T16:26:28Z")

</div>

Also, is there a global “Refresh” command that’s not specific to a foundset? A way to just say "refresh the data since it seems like logging out and back into servoy client fixes the problem. There should be a way to trigger a global refresh command?

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [December 22, 2006, 4:35pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/13 "2006-12-22T16:35:31Z")

</div>

> sammyzheng:  
> Also, is there a global “Refresh” command that’s not specific to a foundset? A way to just say "refresh the data since it seems like logging out and back into servoy client fixes the problem. There should be a way to trigger a global refresh command?

That would be the flush cache command in the servoy admin pages.

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 22, 2006, 4:51pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/14 "2006-12-22T16:51:12Z")

</div>

> ROCLASI:
> 
> > sammyzheng:  
> > Also, is there a global “Refresh” command that’s not specific to a foundset? A way to just say "refresh the data since it seems like logging out and back into servoy client fixes the problem. There should be a way to trigger a global refresh command?
> 
> That would be the flush cache command in the servoy admin pages.

I tried that, it didn’t work (the servoy admin page flush cache command).

Since i’ve never used that databasemanager.refreshrecordfromdatabase command before. Can someone give me some pointer on how to use it?

How do you just do a refresh of the entire foundset or the current record?

databasemanager.refreshRecordFromDatabase(relatedfoundset,-1)

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [December 22, 2006, 4:53pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/15 "2006-12-22T16:53:13Z")

</div>

> ROCLASI:  
> That would be the flush cache command in the servoy admin pages.

And can also be triggered by the RawSQL plugin.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [December 22, 2006, 5:12pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/16 "2006-12-22T17:12:49Z")

</div>

> sammyzheng:  
> How do you just do a refresh of the entire foundset or the current record?
> 
> databasemanager.refreshRecordFromDatabase(relatedfoundset,-1)

It’s all in the record index value… -1 is the whole foundset.

```auto
//Whole foundset:
databasemanager.refreshRecordFromDatabase(foundset,-1)

//Current record only:
databasemanager.refreshRecordFromDatabase(foundset,foundset.getSelectedIndex())

```

> ngervasi:  
> And can also be triggered by the RawSQL plugin.

Ah yes! Almost forgot about that one ![:)]( "Smile")

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [December 22, 2006, 5:22pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/17 "2006-12-22T17:22:44Z")

</div>

> ROCLASI:
> 
> > ngervasi:  
> > And can also be triggered by the RawSQL plugin.
> 
> Ah yes! Almost forgot about that one ![:)]( "Smile")

Forgiven.  
But only because Christmas is coming!! ![:D]( "Very Happy")

---

<div class="post-metadata">

**Author:** ![sammyzheng](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sammyzheng](https://forum.servoy.com/u/sammyzheng)\
**Post date:** [December 22, 2006, 8:23pm UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/18 "2006-12-22T20:23:58Z")

</div>

on my limited testing, looks like the fix WORKED!databasemanager.refreshRecordFromDatabase(foundset,-1)

I will have script it into the onDataChange script for every field to double ensure the update happens. One more question, do i need to put that for create new record too?(when the “refresh” isn’t working, even new records being created aren’t updated to all clients); will the databasemanager.refreshRecordFromDatabase(foundset,-1) refresh NEW records being created as well?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 23, 2006, 1:05am UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/19 "2006-12-23T01:05:50Z")

</div>

complete foundset:  
databasemanager.refreshRecordFromDatabase( (related)foundset,-1)

selected record:  
databasemanager.refreshRecordFromDatabase( (related)foundset,0)

specific record:  
databasemanager.refreshRecordFromDatabase( (related)foundset,12)

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://forum.servoy.com/u/david)\
**Post date:** [January 6, 2007, 8:47am UTC](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887/20 "2007-01-06T08:47:06Z")

</div>

A question sammyzheng: do you have more than one named server connection pointing to the same database?

[Next page](https://forum.servoy.com/t/data-broadcasting-between-clients-help/6887.md?page=2)
