Hi Everyone,
I was hoping I could get some advise on a idea that I am thinking about
This is what I have at the moment a small
Application written in Gambas that connects to a central MySQL server and pulls down all data from that server to a local MySQL server (this may change if I can find a low memory database that works with Gambas)
The sync app starts full screen but once it has done the first sync (get all data etc) from the server is there a way to switch it to a screenless app in the background?
I know if I start the app like
./home/algpos/dbsyc/dbsync.gambas && the app will run in the background but I need it to be in the only app that has focus until it has completed its work.
Is it possible to switch apps between main and background work?
Advise on a idea
- BruceSteers
- Posts: 1608
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Advise on a idea
it may not retain focus but you can set Form.TopOnly = True or False and Form.Stacking = Window.Above or Window.Normal
that will keep your window above all the others and you can unset the flags when it's done
that will keep your window above all the others and you can unset the flags when it's done
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- BruceSteers
- Posts: 1608
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Advise on a idea
if you want your app to talk to other gambas apps of yours then look into DBus
If at first you don't succeed , try doing something differently.
BruceS
BruceS
-
- Posts: 363
- Joined: Wednesday 2nd December 2020 12:11am
- Location: Northampton, England
- Contact:
Re: Advise on a idea
I'm using pipe to talk between the apps
- BruceSteers
- Posts: 1608
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Advise on a idea
cool then your main app could disable the other apps while it's working then release them when it's done it's business
If at first you don't succeed , try doing something differently.
BruceS
BruceS
-
OnlinePJBlack
- Posts: 191
- Joined: Tuesday 9th June 2020 10:26pm
- Location: Florstadt, Hessen, Germany
Re: Advise on a idea
i honestly don't understand the intention behind your question ...
is it about computation time? then have a look at the command nice (i have seen functional somewhere in gambas too)
and an application that compares the data ... uh yes ... if you have two mysql servers running anyway (i hope you mean mariadb) have a look at the terms replication, and/or cluster and let the one who can do it best do the work ...
if you need something small on the client side you could also use sqlite and mariadb/mysql on the server ... also with this the replication works
Translated with www.DeepL.com/Translator
is it about computation time? then have a look at the command nice (i have seen functional somewhere in gambas too)
and an application that compares the data ... uh yes ... if you have two mysql servers running anyway (i hope you mean mariadb) have a look at the terms replication, and/or cluster and let the one who can do it best do the work ...
if you need something small on the client side you could also use sqlite and mariadb/mysql on the server ... also with this the replication works
Translated with www.DeepL.com/Translator
- BruceSteers
- Posts: 1608
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Advise on a idea
I think i may have misread the question, you kinda lost me a bit at SQL..
How about something like...
How about something like...
FMain.FullScreen = True
' do your routines..
' when finished
FMain.FullScreen = False
If at first you don't succeed , try doing something differently.
BruceS
BruceS
-
- Posts: 363
- Joined: Wednesday 2nd December 2020 12:11am
- Location: Northampton, England
- Contact:
Re: Advise on a idea
That does not put the application into the background that only makes the app screenless.BruceSteers wrote: ↑Thursday 22nd July 2021 12:07pm I think i may have misread the question, you kinda lost me a bit at SQL..
How about something like...
FMain.FullScreen = True ' do your routines.. ' when finished FMain.FullScreen = False
-
- Posts: 363
- Joined: Wednesday 2nd December 2020 12:11am
- Location: Northampton, England
- Contact:
Re: Advise on a idea
@PJBlackPJBlack wrote: ↑Thursday 22nd July 2021 9:34am i honestly don't understand the intention behind your question ...
is it about computation time? then have a look at the command nice (i have seen functional somewhere in gambas too)
and an application that compares the data ... uh yes ... if you have two mysql servers running anyway (i hope you mean mariadb) have a look at the terms replication, and/or cluster and let the one who can do it best do the work ...
if you need something small on the client side you could also use sqlite and mariadb/mysql on the server ... also with this the replication works
Translated with www.DeepL.com/Translator
Yes Replication would be a way to do this but it would replicate EVERY things from the Master Database to the Local PoS Database and I do not need every table and every field on the local PoS Database.
I have created the sync app so I can control what information is sent to the master database (mysql) and what is deleted from the local Database.
Does anyone have any examples of how to use sqlite with Gambas?
-
OnlinePJBlack
- Posts: 191
- Joined: Tuesday 9th June 2020 10:26pm
- Location: Florstadt, Hessen, Germany
Re: Advise on a idea
https://gambaswiki.org/wiki/howto/databasesqlite
https://gambaswiki.org/wiki/comp/gb.db/connection
https://www.sqlite.org
the difference between sqlite and real dbms is a) the lack of user management, b) sqlite is local and file based and c) the usual small things ...
if you have a connection open sqlite will be accessed via sql just like other databases ...
https://gambaswiki.org/wiki/comp/gb/app ... n/priority
https://gambaswiki.org/wiki/comp/gb/application/daemon