HB_NETIO help

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 3363
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 259 times
Been thanked: 163 times
Contact:

HB_NETIO help

Post by mol »

Hi!
I'm trying to write application using HB_Netio.


My ide was to create server app, which opens all dbf files on begin.
Then, I want to call remote procedures from my app.
I found problem - when procedure is called from remote station, it can't see opened files.
Is it right?
Is it the way to obtain this situation? Or I need to oped requested dbf every time when I want to read date from it?

Maybe these questions are stupid, but these are my first steps with HB_Netio :-)
Regards, Marek

User avatar
serge_girard
Posts: 2512
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 810 times
Been thanked: 154 times
Contact:

Post by serge_girard »

Hi Marek,

Better to open SHARED, read it and close it!
So every time you need it , open it and read it then close.
NETIO works great!

Serge

User avatar
serge_girard
Posts: 2512
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 810 times
Been thanked: 154 times
Contact:

Post by serge_girard »

Marek,

Works also perfect with local-MySQL and remote-MySQL!

Serge

User avatar
mol
Posts: 3363
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 259 times
Been thanked: 163 times
Contact:

Post by mol »

serge_girard wrote:
Thu Apr 20, 2017 10:57 am
Hi Marek,

Better to open SHARED, read it and close it!
So every time you need it , open it and read it then close.
NETIO works great!

Serge
But, if I want to keep dbfs open whole time? Is it possible?

edk
Posts: 579
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 148 times
Been thanked: 510 times

Post by edk »

Marek, you have to keep in mind that for each session, public variables and open files are stored separately.
There are three sessions:
1. Session of the running IO server
2. Client session
3. Session of calling the function by the client on the IO server

In an attachment you have an example of how variables behave and opened databases.
See the "kluczrob" variable, the value it has in the IO server session can be viewed by clicking in the tray on the IO server icon.
To all: I'm sorry, but the coments are in Polish
netio_marek.7z
(2.05 MiB) Downloaded 202 times
mol wrote:
Thu Apr 20, 2017 1:03 pm
But, if I want to keep dbfs open whole time? Is it possible?
Yes, it is possible, look at attachment.

Edward
Last edited by edk on Thu Apr 20, 2017 2:25 pm, edited 3 times in total.

User avatar
mol
Posts: 3363
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 259 times
Been thanked: 163 times
Contact:

Post by mol »

Thank you Edward!

edk
Posts: 579
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 148 times
Been thanked: 510 times

Post by edk »

You're welcome.
Make a test of how long the replies are sent from the IO server to the client. On slow connections and at large databases, sending all the data to the client can take quite some time. Consider whether it is better to send them in parts (pages), then you need to change the GUI on the client side.

User avatar
apais
Posts: 342
Joined: Fri Aug 01, 2008 6:03 pm
Location: uruguay
Has thanked: 61 times
Been thanked: 38 times
Contact:

Post by apais »

or...
you can create a temporal dfb (kinda serialized remote recordset) in server, and open it from client so you don't have to transmit over the LAN/WAN
best of both worlds !
you can even store a dbf in server and make local indexes/scopes/filters
the only limit is your imagination

User avatar
mol
Posts: 3363
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 259 times
Been thanked: 163 times
Contact:

Post by mol »

Ufff, I have understood idea of netio.

User avatar
serge_girard
Posts: 2512
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 810 times
Been thanked: 154 times
Contact:

Post by serge_girard »

Marek,

Why would you keep dbfs open whole time? If SHARED you can not do any update.

Serge

Post Reply