File reading problem!

  • Thread starter Thread starter IMRAN SAROIA
  • Start date Start date
I

IMRAN SAROIA

Hi!

I am Visual FoxPro and Visual Basic.Net Developer.
One of my app uses file on Network Server Computer.
This small network is switch based and operates at the 100 MBS
Some times Window 2000 denies access to already opened file.
Can you advise any solution?

Thanks in advance!
 
Mostly for Visual FoxPro files, it is the file(*.dbf)?
This problem can be smiulated if some body opens the
app and then the server computer shuts down. Then one using the app
will get the message "Error reading file". I think file handle is lost.
 
With the server shutting down this is a locking issue. This is where pages,
records, or fields (depending on your config and programming) are locked as
in use, but the lock isn't cleared. This is one of the basic tenets of
multi-user database applications. Things like SQL and even Access handle
this better than VFP did.

Dropping the server leaves the lock file there (I think it was .lck in VFP)
and will not allow the object to be opened for another user. In the normal
use case, this is probably similar, but would probably be due to a
programming problem rather than a network or file access problem.

You will want to make use of disconnected ADO.net objects or SPROCs to
handle transactions in a more discreet way. You can also configure locking
in the dataconnector or the globals.

In the end, you may want to consider migration to SQL or getting someone to
help you review code. Try posting in the ADO.net or VFP forums for help
there. VFP lock management isn't my area...
 
Back
Top