HB_NETIO help

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
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: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_NETIO help

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
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_NETIO help

Post by serge_girard »

Marek,

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

Serge
There's nothing you can do that can't be done...
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HB_NETIO help

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: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HB_NETIO help

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 293 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.
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HB_NETIO help

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: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: HB_NETIO help

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
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HB_NETIO help

Post by mol »

Ufff, I have understood idea of netio.
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HB_NETIO help

Post by serge_girard »

Marek,

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

Serge
There's nothing you can do that can't be done...
Post Reply