[Solved] Multi User HSQLDB, Realtimedisplay in Servermode

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

[Solved] Multi User HSQLDB, Realtimedisplay in Servermode

Post 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.
Last edited by F3K Total on Sat May 12, 2012 11:54 am, edited 1 time in total.
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
Villeroy
Volunteer
Posts: 31291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Multi User HSQLDB, Realtimedisplay in Servermode

Post by Villeroy »

http://user.services.openoffice.org/en/ ... 04#p196704 (activating the built-in refresh timer in spreadsheet)
http://user.services.openoffice.org/en/ ... 13&t=53751 (silly AOO issue)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: Multi User HSQLDB, Realtimedisplay in Servermode

Post 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
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
Villeroy
Volunteer
Posts: 31291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Multi User HSQLDB, Realtimedisplay in Servermode

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: Multi User HSQLDB, Realtimedisplay in Servermode

Post 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
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Multi User HSQLDB, Realtimedisplay in Servermode

Post 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?
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod

Post 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
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod

Post 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.'
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod

Post 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
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod

Post 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

Code: Select all

.ShowOnlineLayout = true
but had no success.

Greats Rik
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
F3K Total
Volunteer
Posts: 1040
Joined: Fri Dec 16, 2011 8:20 pm

Re: [Solved] Multi User HSQLDB, Realtimedisplay in Servermod

Post 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
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Post Reply