Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disconnect and reconnect and crash
Message
From
06/04/2006 12:42:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/04/2006 12:22:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01111043
Message ID:
01111058
Views:
17
>I reach down and disconnect the network cable from my workstation.
>I wait 30 seconds and reconnect the network cable.
>
>I still have not touched the keyboard or mouse.
>
>I select an account to see it's details.
>
>The app crashes because the requery fails.
>
>Is this normal VFP functionality? Is there any way to correct this?

Fox has always, in all of its versions, relied on keeping tables open. I've seen a few rare cases, in some versions of Windows (W98 maybe) that the network reestablished, or didn't break, the connections when the physical disconnection was brief enough (probably within some polling interval somewhere). In the other 99.9% of the cases, this is fatal.

A possible way around this would be to use oledb object to establish the connection, and then if it errors out, try to reconnect and have it try to do again whatever it was told to do.

Also, you may be able to catch this type of error when using tables directly, and have them reopened, but that'd be hard to implement, because it would only have to be applied in the places where you do something with the tables, which is usually quite a lot in VFP.

Anyway, this shouldn't happen in the first place, and pretty much nobody is coding against this type of trouble, AFAIK. And if it happens - it's hardware malfunction, it's not your app at fault.

If your app lives in an environment where workstations get disconnected regularly, you may start using local remote views taken offline, and resync them when your workstations get connected. Never tried that, but it may work.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform