Page 1 of 1
[Solved] Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Fri May 11, 2012 6:48 pm
by F3K Total
Good evening,
for the first time, yesterday, i was able to run a HSQLDB in servermode, using BASE as frontend.
That's great!
But, if i, for example, have two users, A and B, working at different places with the db.
What do i have to do, that A sees B's changes on his screen in realtime?
Is there a possibility that the db says "Hello I'm changed" reload the forms!
I read something about triggers in the HSQLDB manual, but don't know if it's a theme that can help me.
Or do i have to write a macro with time-loop what reloads the forms lets say every 30 s?
I would be happy about any hint.
Greats Rik
BTW: I testet OOo 3.4 today and had to recongnize, that all forms where opened in print- and not in webmode, like in LO, where it's called a bug.
i postet this topic also
here.
Re: Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Fri May 11, 2012 8:33 pm
by Villeroy
Re: Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Fri May 11, 2012 9:11 pm
by F3K Total
Hello Villeroy,
thanks for the link, but it doesn't help me, 'cause i don't have any "DatabaseRanges" in my forms, they're only in Calc.
I forgot to write that above.
I want to reload forms on each client, but if possible, only when a Row in the servermode-DB was inserted, changed or deleted.
Greats Rik
Re: Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Fri May 11, 2012 9:33 pm
by Villeroy
Well, the spreadsheet may display these changes and you can have forms on sheets. For anything else you need a self-written timer.
Re: Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Sat May 12, 2012 11:53 am
by F3K Total
Hello,
i do it now with a timer, but not a loop in Starbasic which affects other basic macros.
I found the solution here:
http://www.oooforum.org/forum/viewtopic.phtml?t=59763
Greats Rik
Re: Multi User HSQLDB, Realtimedisplay in Servermode
Posted: Sat May 12, 2012 11:21 pm
by DACM
F3K Total wrote:I want to reload forms on each client...
Hi Rik,
Do you mind posting your code? I'm just wondering because it seems you would have to save the Form state (all control values plus the record ID or record bookmark) because a Form 'reload' would otherwise dump the user's current inputs and/or jump to the first record. Did you solve this as well?
Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod
Posted: Sun May 13, 2012 12:49 am
by F3K Total
Hello DACM
DACM wrote:Do you mind posting your code? I'm just wondering because it seems you would have to save the Form state (all control values plus the record ID or record bookmark) because a Form 'reload' would otherwise dump the user's current inputs and/or jump to the first record. Did you solve this as well?
Yes, you're right, a reload does that.
In my special case, it's just important, that two clients can communicate in a ping pong way.
Means, i reload only that form what shows new informations from the other side, but not an input form.
The receiver can mark not longer needed infos with a check-box, where i attached a quick "update-row-macro" to get the boolean info "not longer needed" immediately into the database. If he hits exacly the reload period, he has maybe to click twice.
But this is an interesting question. How should man do that? Is it possible to use .isnew or .ismodified?
How to recognize, that a user is working on the form, to avoid an update? Any ideas?
Greats Rik
Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod
Posted: Sun May 13, 2012 3:40 am
by DACM
F3K Total wrote:...Is it possible to use .isnew or .ismodified?
That's even better! Yes, as long as those Form properties work as advertised (programmatically), it is much better to skip the 'reload' whenever the user is working on database input through a Form. Thanks for the tip!
That would certainly solve the user-input issues without saving individual Control states. But other Form states may be relevant to any 'reload.' For instance, it would still be necessary to save the current Form record ID / bookmark, and perhaps any sorts or filtering the user may have input using the toolbar. My experience dictates that record ID is better than bookmarks because bookmarks are simply relative to the result-set, which may change (sort, filter, etc.) upon 'reload.'
Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod
Posted: Sun May 13, 2012 10:19 am
by RPG
Hello
I cannot complete follow the discussion here but maybe this
interface XFormOperations can help you. The explanation there is clear enough. As far I understand it you should use it with the view of the form and not the model of the form.
Romke
Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod
Posted: Sun May 13, 2012 12:13 pm
by F3K Total
Hello Villeroy
Villeroy wrote:viewtopic.php?f=13&t=53751 (silly AOO issue)
thanks for that link, i was searching a long time for
but had no success.
Greats Rik
Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod
Posted: Sun May 13, 2012 8:11 pm
by F3K Total
Hello DACM
F3K Total wrote:If he hits exacly the reload period, he has maybe to click twice.
That causes disappearing rows while clicking "not longer needet" and might disturb the user.
I found a solution for that:
It's easy to stop reloading on "MouseMove".
My trigger period is 10s, the user has now at least 10s to hit the next checkbox in the gridcontrol.
When he finishes his current selction, all selected rows disappear in one step.
I also thought about "onMouseOver", but if the user leaves the cursor in the grid, reloading would be blocked. Not good.
Greats Rik