Discussion:
Accessing data on a LAN
(too old to reply)
Dan Musicant
2011-10-03 23:18:14 UTC
Permalink
I have an application that accesses data on a 2TB USB HD connected to a
Windows XP machine that's connected by ethernet to my wireless router. I
have non-current data that's local and I have my application (running on
any of 3 machines, 2 connected wirelessly to the network and 1 connected
by ethernet) to check to see that the server data is available. If it
isn't, it tells me in a message that it's local data that is being used
(i.e. data that's on the requesting machine's HD), not the server data,
which is the most current. Theoretically this should not be necessary
because the server machine and it's USB external drive are on 24/7, but
for some reason I often get the message that I'm using local data. When
that happens, if I want to use server data I have to open an explorer
window and click on the USB drive, then my application behaves.

I'm using this logic to determine if the server data is being used:

IF FILE('W:\data\fox\dj\d.prg') OR FILE('W:\data\fox\dj\programs\d.prg')
llLocal=.F.
LcDataDRV='W:'
ELSE
llLocal=.T.
ENDIF

Is there a nice solution to this pretty annoying problem?

Dan


Email: dmusicant at pacbell dot net
Gene Wirchenko
2011-10-03 23:32:05 UTC
Permalink
On Mon, 03 Oct 2011 16:18:14 -0700, Dan Musicant <***@privacy.net>
wrote:

[snip]
Post by Dan Musicant
Is there a nice solution to this pretty annoying problem?
Is this a FoxPro problem, or is it a network problem?

Check your W: setup. Is this on a machine that only you use? I
read of a case where someone was complaining that she could not access
the network shares. The upshot was that she was closing the DOS
window where the setup of the network shares were being done so that
the system would start up faster.

Check any configuration files that you think might be involved.
Check them anyway. I got stung today with not being able to get into
my E-mail through the Web interface. It turned out that the setting
to allow cookies for my ISP's Website had mysteriously disappeared.

If you have a flaky network, I suppose that that could result in
what you describe. VFP uses a network harder than, say, Word, so that
other programs work fine is not enough.

HTH. Please post the resolution.

Sincerely,

gene Wrichenko
Dan Freeman
2011-10-04 02:52:43 UTC
Permalink
This is a Windows network configuration issue.

There is a setting whereby network shares "sleep" when not in active
use. As you've noticed, one way to wake them up is interactively with
Windows Explorer.

The setting is present because active shares are costly to the network
itself, but they're absolutely necessary to an application like Foxpro.

I don't know of any way to programmatically wake up a sleeping share.
You should hook up with a Windows networking specialist (maybe find one
in a Windows networking newsgroup?) and ask how to turn this off. It
can be done.

Dan
Post by Dan Musicant
I have an application that accesses data on a 2TB USB HD connected to a
Windows XP machine that's connected by ethernet to my wireless router. I
have non-current data that's local and I have my application (running on
any of 3 machines, 2 connected wirelessly to the network and 1 connected
by ethernet) to check to see that the server data is available. If it
isn't, it tells me in a message that it's local data that is being used
(i.e. data that's on the requesting machine's HD), not the server data,
which is the most current. Theoretically this should not be necessary
because the server machine and it's USB external drive are on 24/7, but
for some reason I often get the message that I'm using local data. When
that happens, if I want to use server data I have to open an explorer
window and click on the USB drive, then my application behaves.
IF FILE('W:\data\fox\dj\d.prg') OR FILE('W:\data\fox\dj\programs\d.prg')
llLocal=.F.
LcDataDRV='W:'
ELSE
llLocal=.T.
ENDIF
Is there a nice solution to this pretty annoying problem?
Dan
Email: dmusicant at pacbell dot net
Dan Musicant
2011-10-05 20:31:28 UTC
Permalink
On Mon, 03 Oct 2011 19:52:43 -0700, Dan Freeman <***@dfapam.com> wrote:

:This is a Windows network configuration issue.
:
:There is a setting whereby network shares "sleep" when not in active
:use. As you've noticed, one way to wake them up is interactively with
:Windows Explorer.
:
:The setting is present because active shares are costly to the network
:itself, but they're absolutely necessary to an application like Foxpro.
:
:I don't know of any way to programmatically wake up a sleeping share.
:You should hook up with a Windows networking specialist (maybe find one
:in a Windows networking newsgroup?) and ask how to turn this off. It
:can be done.
:
:Dan

Yeah, thanks. I was thinking that using a "server" OS like Windows Home
Server would work around this issue, but before taking such drastic
steps (maybe having to get another machine instead of my laptop as the
server, and purchasing and installing, configuring, etc. WHS) I will try
to find the workaround you describe.

Dan

PS The problem may be with Windows XP's "sleep" settings but also
possibly implicated may be the USB HD, a Western Digital Elements 2TB
USB drive, which I believe has sleep characteristics. IIRC, there may be
a utility from WD that will help with this, another thing to
investigate.
:
:
:Dan Musicant wrote :
:> I have an application that accesses data on a 2TB USB HD connected to a
:> Windows XP machine that's connected by ethernet to my wireless router. I
:> have non-current data that's local and I have my application (running on
:> any of 3 machines, 2 connected wirelessly to the network and 1 connected
:> by ethernet) to check to see that the server data is available. If it
:> isn't, it tells me in a message that it's local data that is being used
:> (i.e. data that's on the requesting machine's HD), not the server data,
:> which is the most current. Theoretically this should not be necessary
:> because the server machine and it's USB external drive are on 24/7, but
:> for some reason I often get the message that I'm using local data. When
:> that happens, if I want to use server data I have to open an explorer
:> window and click on the USB drive, then my application behaves.
:>
:> I'm using this logic to determine if the server data is being used:
:>
:> IF FILE('W:\data\fox\dj\d.prg') OR FILE('W:\data\fox\dj\programs\d.prg')
:> llLocal=.F.
:> LcDataDRV='W:'
:> ELSE
:> llLocal=.T.
:> ENDIF
:>
:> Is there a nice solution to this pretty annoying problem?
:>
:> Dan
:>
:>
:> Email: dmusicant at pacbell dot net
:



Email: dmusicant at pacbell dot net
Dan Musicant
2011-10-05 20:38:45 UTC
Permalink
On Wed, 05 Oct 2011 13:31:28 -0700, Dan Musicant <***@privacy.net>
wrote:

:PS The problem may be with Windows XP's "sleep" settings but also
:possibly implicated may be the USB HD, a Western Digital Elements 2TB
:USB drive, which I believe has sleep characteristics. IIRC, there may be
:a utility from WD that will help with this, another thing to
:investigate.

Indeed, I just visted WD's downloads page for my HD and found this:

File Name: WD_External_Spindown_1-00.zip
File Size: 3.50 MB
Version: Version 1.0
Publish Date: Sep, 2004

It says in description:

This utility is for use with all Western Digital external hard drives
except for the Media Center and the Dual-option Backup drives. It is
designed to give greater user control over the spindown of the external
drive.

- - - -

I may find that this alleviates or resolves the problem.

Dan

PS In a way, I hate to do this if it increases my energy usage or
reduces the life of the drive, but I have to do something! Right now,
the drive uses close to zero energy when not in use, according to my
Kill-a-Watt device.


Email: dmusicant at pacbell dot net

Loading...