Page 1 of 2

HB_NETIO help

Posted: Thu Apr 20, 2017 9:33 am
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

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 10:57 am
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

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 10:57 am
by serge_girard
Marek,

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

Serge

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 1:03 pm
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?

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 1:12 pm
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 178 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

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 1:30 pm
by mol
Thank you Edward!

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 1:45 pm
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.

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 3:37 pm
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

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 5:44 pm
by mol
Ufff, I have understood idea of netio.

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 6:21 pm
by serge_girard
Marek,

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

Serge