Solved

Does VFP correctly runs at wireless network?

Posted on 2013-06-16
23
720 Views
Last Modified: 2013-06-25
Hi Experts!

Just to confirm what was posted before, VFP doesn´t  correctly runs at a wireless network, isn't it?

Thanks in advance!
0
Comment
Question by:Eduardo Fuerte
  • 10
  • 9
  • 4
23 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 400 total points
Comment Utility
I cannot say "VFP doesn´t  correctly runs at a wireless network"...

The problem of wireless networks (2.4 GHz) is stability. And the problem of FoxPro is unstable network... and it does not matter what kind of network do you use.

Another problem is Windows network setup and/or drivers compatibility in heterogeneous environment, e.g. Windows clients and Linux file server.

Imagine a situation where both the file server and all workstations are connected to some WiFi access point. Each workstation has to read the whole DBF file and appropriate CDXes (and FPT memos) over two relatively unstable connections (WKST to AP and AP to the fileserver). Once some WiFI dropout happens FoxPro will report an 11xx error which is not recoverable because some part of data is missing obviously.

Even when the WiFi connection is broken for a small period of time when no operation is performed you have to reopen all files to make sure the data buffers are ready. I am testing WiFi dropouts by the following simple procedure:
PROCEDURE CheckDataConnection

*-- DbVersion.DBF contains just one record and remains still open by the app
*-- I am using DbVersion.DBF to check possible app exclusive use

*-- Failed FLUSH FORCE on DbVersion.DBF indicates network dropout
*-- If DbVersion.DBF isn't open for whatever reason
*--  simply try to open DbVersion.DBF again. If it fails data were disconnected.

LOCAL lcAlias, lcDataPath, llError, loErr AS Exception
lcAlias = SYS(2015)
lcDataPath = AppDataFolder()

TRY
  IF USED("DBVERSION")
    FLUSH IN DBVERSION FORCE
  ELSE
    USE (m.lcDataPath + "SYSDATA\DBVERSION") AGAIN SHARED IN 0 ALIAS (m.lcAlias)
    USE IN SELECT(m.lcAlias)
  ENDIF
CATCH TO loErr
  llError = .T.
ENDTRY

IF m.llError
  *-- Close the App if error happens
  AppMessage("msgDataFolderWasDisconnected", 16, "Application Error " + TRANSFORM(loErr.ErrorNo))
  DO CloseAllForms WITH , .T.
  CLEAR EVENTS
  ON ERROR QUIT
  ON SHUTDOWN
  CANCEL
ENDIF

RETURN .T.

Open in new window

0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
Pavel has explained the details very well. I can only stress out VFP uses long term file handles, which is a problem with Wifi, no matter what frequency or bandwidth.

What worked for me is to pull data via Wifi connection to local drives, work on that and merge changes back. This means rolling your own tableupdate() mechanism in the end. Or data transfer and merging in the bigger scope. Since I had that already for offline working on notebooks it was not much work to do.

You can always try, technology get's better and more stable, but cableing was always more stable for me so far. It also can have it's problems, but there's nothing better, only not working networked at all.

Bye, Olaf.
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
Offline data is a good option.

Another option is to use the app in client-server mode. Data are handled locally on the server and network stability does not affect them. Communication dropout during the data transfer causes the client app to fail but such error is recoverable - you may simply send or ask data again.

If, of course, means major app update no matter if the server is SQL Server, MySQL, or even Visual FoxPro running as a COM object.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Hello

Thank you for your replies.

I don't know if I correctly understood, but:

The way I developed the operation is:

DBF free/ FTP/ CDX remains on the server (only).

EXE/ DLL/ APP (only) installed independently at each client, with a configuration DBF that maps to where the data remains.

So if wireless fails in some actualization (say in a CRUD operation) it could be easy
to rescue the error by running the code you give us?

This code must be executed before every DB operation/ data actualization to ensure correct actualization? Could it overlap the network fail?
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
No, the code just indicates network problems.

It cannot overlap them, it cannot avoid them. If the network problem occurs in file server app then the best you can do is to restart the app and possibly reindex all DBFs open during the failed operation (except data reading where it is not necessary).

I am executing the code before each form opening and before each attempt to modify the data. It does not avoid problems when users wait a long time in edit mode etc.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Ok, better understood.
In your particular case is it tolerable the fail frequency?
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
What means tolerable? File server data access over WiFi should not be tolerated at all...

I've been fixing corrupted DBFs just twice in a few years but the network unavailability was bigger problem. Two or three notebooks connected to a low end WiFi router in one small shop were unstable very often so that the only one used as a server was operational full time... I've been recommending them wire connection very strongly. The reason of the low stability was not investigated but it could be anything, e.g. WiFi noise in the locality, heavy tram traffic etc.

WiFi connection should be used for home testing only.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
What I've meant by tolerable is the number of times it's needed  running the routine due to network unavailability, during a period of time (a day f.e.).

My systems are freely distributed to attend a restricted public, so depending on the case the people will use the network they have(conventional or wireless).

What I can do is advise to avoid wireless network when possible and if necessary giving an strategy by using the code you gave us.
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
The code is just a minimum you can do. To help them to create a more stable environment is much better contribution to solve unstable network problem.

Client - server approach or even cloud/internet (e.g. FoxInCloud or ActiveVFP) could be better but it means a lot of coding, more complex setup etc. etc.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
But in client server approach (by using MySQL f.e.) the network issue still exists, doesn't it?

I'm slowly converting the code to PHP/MySQL, I tought is a better option.
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
Yes, the network issue exists independently on the application.

C-S approach just avoids data corruption caused by the unstable network which is important in many cases. PHP/MySQL is one of the C-S possibilities.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 100 total points
Comment Utility
The point about C-S systems is, you don't have long term access to files, you have a server side process taking in requests and then accessing local data files.

Of course data also goes through the network, but if that fails, what fails is communication with the server side process, the database file does not break. When a connection is reestablished the server component can request repeated communication, the OS cannot handle that equivalently on it's own, if only client side processes are involved working on the same file.

This separation makes C-S more stable, even in case of less stable networks.

Bye, Olaf.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Ok, I was thinking about the 90's C-S approach not in http.

To migrate from VFP to PHP/ MySQL is challenging but doable with some extra tools.

First I'm translating the DB parts to SP and using dbForge to debug these, it has  a debbuger similar to VFP.

And using CodIgniter (one of the various MVC frameworks that I choose) to migrate "forms".

I've bought KoolPHPSuite to have some ready to use controls too.

So I'm during the "inertial phase", gaining experience, and going slowly...
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
If your app has the data layer isolated from the UI and business logic then the application port to C-S does not mean any major changes.

You may use Upsizing Wizard in VFP, you may use CursorAdapters, or you may manually rewrite the data layer part. Of course, everything means some amount of work but to swap into PHP is much more complicated and the result is not as good as the original app because web browser UI does not allow so many fine things...

You could also think about the automated conversion into FoxInCloud etc.

Possibilities are wide and testing is time consuming and the world is faster and faster and we need to make a good decision for the future development...
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Hello

I've made my decision for PHP/MySQL due it has a wide range of users that continually post comments and doubts and improve it.

But it's intrinsic funcionalities and behaviours is not so easy to domain(maybe the fine things you've mentioned) probably as other net platforms.
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
>This separation makes C-S more stable, even in case of less stable networks.
I was also thinking of LAN C-S, with a SQL Server, no matter if MS SQL Server or MySQL. You don't need a webhoster for a MySQL database, you can install it to a domain server as well as MS SQL Server. This works as good with partially disconnects, as does an Intranet solution. Only longer network outage will be a problem, but that's a problem for any neewd, even for file serving of office documents.

You've been shown how you connect to MySQL, the server can also be a LAN server, which you address via it's IP. Additional to that you need firewall settings, but the same things go form MSSQL, the OS firewall defaults just may make MSSQL easier to setup, but it's not that hard.

OF course C-S is different than what you can do in VFP, but you can also do clean C-S in a VFP frontend. As you have the transition you can also go the step to PHP, but that's taking more efforts than just changing data access.

Bye, Olaf.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Hello

Yes, times before I've connected to remote MySQL hosted at web, with your assistance.

One pass of my strategy was to populate it with local VFP data that was done with success. Maybe in the future the stations running VFP will interact with remote MySQL DB frequently, for now I'm thinking the best way in doing that.

Another pass is how to dominate PHP/MySQL, one thing I get was to obtain grids about the data inserted, using parameters by develop a MySQL SP based on VFP code (KoolPHPSuite has helped in that).

By now I'm constructing a PHP form to nearly "imitate" a VFP form using CodeIgniter and KoolPHPSuite features. Maybe some validations must run by inside the MySQL stored functions... I'm really in a trial and error process...

(VFP code and running is the font and template to see how the things go in this experience)
0
 
LVL 29

Expert Comment

by:Olaf Doschke
Comment Utility
Again, just to make the point clear, you can also install MySQL as database without installing IIS or PHP or Apache and make use of the database only on a Windows Server, you don't need a MySQL database in the internet. And that way it would be the same classic desktop client-server as is VFP with MSSQL on a Windows Server.

Bye, Olaf.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Sorry the delay, my country is slightly chaotic the last days....

Yes, I'm considering VFP / MySQL on a Windows Server as na alternative too.

The SPs and SFs I'm constructing could be usefull in this contexto too.
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
Sounds like a Brasil...

Our country is also chaotic these days but not as the Brasil. See this Taiwanian animation for more details.

The resolution: WiFi stability is not affected by the country government.
0
 

Author Comment

by:Eduardo Fuerte
Comment Utility
Good to relax...

Here Czech's philosophy we recently studied, you probably know...
Os-Luminares-Thecos--psicografia.pdf

It's time to thank all your always good assistance and contributions and close the question.

(Fortunatelly the user  has a conventional network)
0
 

Author Closing Comment

by:Eduardo Fuerte
Comment Utility
Thank you for so good participation and assistance!
0
 
LVL 41

Expert Comment

by:pcelba
Comment Utility
You are welcome!  

Unfortunately, I have no time to study filosofy at the moment...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now