Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dealing with Invalid seek offset
Message
 
À
14/01/2015 12:56:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01613531
Message ID:
01613637
Vues:
41
>>>It is IMO bad practise to run from the network. If the workstation goes to sleep/hibernate, wake up, it will have lost the networkconnection and you'll have exactly this problem. It might not have to do with any DBF, but running a function or form or even displaying an image could cause this.
>>>
>>>VFP exes are not 'real' executables. When the exe runs, it will read data from the exe file during execution. Normal PE executables will first load entirely in memory before they are executed.
>>
>>It really does not matter, when the network connection is lost you are in trouble whether you are running the EXE from the local drive or a share, as the data is most likely shared and you will either get an error reading file or an invalid seek offset anyways, and it is an irreversible problem, as you said in the next paragraph, it might be better to run from a launcher, but not for this reason in my opinion.
>
>
>Disagree, as the error will probably show you were trying to access a networked resource.

And that is what I said, the tables are most likely be a networked resource, so unless you are using a multi-tier approach (and I agree with you that it is a better approach but I doubt it is the most common approach used for FoxPro applications) where you do not have any tables open you already have the problem regardless of where your executable resides.


> Also you could try to toughen up your code by checking network connection before attempting to read/write - while not 100% proof, you might catch all lost connections up to this I/O point and only fail when loosing connection DURING I/O operation. Less chances of failure if net failure is not correlated with actual operation but caused by faulty wiring or flaky WLAN.

Same as before, if you are not using a multi-tier approach you most likely have the tables open all the time, for example you have a grid in your form and your tables are open as long as your form is open, so a network error will kill the application regardless of where your executable resides.

>
>my 0.02€
>
>thomas
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform